syntax = "proto3";

package acme.user.v1;

import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";

message Account {
    string id = 1;
    optional string name = 2;
    optional string email = 3;
    optional google.protobuf.Struct metadata = 4;
    repeated string linked_account_ids = 5;

    google.protobuf.Timestamp created_at = 100;
    optional string created_by_account_id = 101;
    optional google.protobuf.Timestamp deleted_at = 102;
    optional string deleted_by_account_id = 103;
    optional google.protobuf.Timestamp updated_at = 104;
    optional string updated_by_account_id = 105;
    oneof owner {
        string owner_account_id = 106;
    }
}
