syntax = "proto3"; package testpb; import "google/protobuf/timestamp.proto"; import "google/protobuf/duration.proto"; import "cosmos/orm/v1alpha1/orm.proto"; option go_package = "github.com/cosmos/cosmos-sdk/orm/internal/testpb"; message A { option (cosmos.orm.v1alpha1.table) = { id: 1; primary_key: { fields: "u32,u64,str" } index:{ id: 1; fields:"u64,str" } index:{ id: 2; fields:"str,u32" } index:{ id: 3; fields:"bz,str" } }; // Valid key fields: uint32 u32 = 1; uint64 u64 = 2; string str = 3; bytes bz = 4; google.protobuf.Timestamp ts = 5; google.protobuf.Duration dur = 6; int32 i32 = 7; sint32 s32 = 8; sfixed32 sf32 = 9; int64 i64 = 10; sint64 s64 = 11; sfixed64 sf64 = 12; fixed32 f32 = 13; fixed64 f64 = 14; bool b = 15; Enum e = 16; // Invalid key fields: repeated uint32 repeated = 17; map map = 18; B msg = 19; oneof sum { uint32 oneof = 20; } } enum Enum { ENUM_UNSPECIFIED = 0; ENUM_ONE = 1; ENUM_TWO = 2; ENUM_FIVE = 5; ENUM_NEG_THREE = -3; } message B { option (cosmos.orm.v1alpha1.singleton) = {id: 2}; string x = 1; } message C { option (cosmos.orm.v1alpha1.table) = { id: 3 primary_key:{ fields:"id" auto_increment: true } }; uint64 id = 1; string x = 2; }