github.com/s7techlab/cckit@v0.10.5/state/mapping/testdata/schema/with_composite_id.proto (about) 1 syntax = "proto3"; 2 3 package schema; 4 option go_package = "github.com/s7techlab/cckit/state/mapping/testdata/schema"; 5 6 import "google/protobuf/timestamp.proto"; 7 8 // EntityWithCompositeId 9 message EntityWithCompositeId { 10 string id_first_part = 1; // part of composite primary key 11 uint32 id_second_part = 2; // part of composite primary key 12 google.protobuf.Timestamp id_third_part = 3; // part of composite primary key 13 14 string name = 4; 15 int32 value = 5; 16 } 17 18 // EntityCompositeId - container for composite primary key 19 message EntityCompositeId { 20 string id_first_part = 1; 21 uint32 id_second_part = 2; 22 google.protobuf.Timestamp id_third_part = 3; 23 } 24 25 // EntityWithCompositeIdList 26 message EntityWithCompositeIdList { 27 repeated EntityWithCompositeId items = 1; 28 } 29 30 // CreateEntityWithCompositeId 31 message CreateEntityWithCompositeId { 32 string id_first_part = 1; 33 uint32 id_second_part = 2; 34 google.protobuf.Timestamp id_third_part = 3; 35 string name = 4; 36 int32 value = 5; 37 } 38 39 // UpdateEntityWithCompositeId 40 message UpdateEntityWithCompositeId { 41 string id_first_part = 1; 42 uint32 id_second_part = 2; 43 google.protobuf.Timestamp id_third_part = 3; 44 string name = 4; 45 int32 value = 5; 46 }