1

I would like to know how to create a GORM model from the GRpc protobuf definition. Especially OneOf types. Below is the sample.

message User {
    string id = 1;
    string mobile = 2;
    oneof user_type {
        Customer customer = 3;
        Merchant merchant = 4;
    }
    bool is_active = 5;
    bool is_verified = 6;
    google.protobuf.Timestamp created_at = 7;
    google.protobuf.Timestamp updated_at = 8;
}
wandermonk
  • 6,856
  • 6
  • 43
  • 93

0 Answers0