-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
syntax = "proto3"; | ||
package fake_models; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
option go_package = "pkg/protobuf"; | ||
|
||
message Address { | ||
int32 version = 1; | ||
string id = 2; | ||
message Customer { | ||
string customer_id = 1; | ||
string customer_type = 2; | ||
} | ||
Customer customer = 3; | ||
string type = 4; | ||
string first_name = 5; | ||
string last_name = 6; | ||
string state = 7; | ||
string house_number = 8; | ||
string city = 9; | ||
string zip = 10; | ||
float latitude = 11; | ||
float longitude = 12; | ||
string phone = 13; | ||
string additional_address_info = 14; | ||
google.protobuf.Timestamp created_at = 15; | ||
int32 revision = 16; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
syntax = "proto3"; | ||
package fake_models; | ||
|
||
option go_package = "pkg/protobuf"; | ||
|
||
message Customer { | ||
int32 version = 1; | ||
string id = 2; | ||
string first_name = 3; | ||
string last_name = 4; | ||
string gender = 5; | ||
string company_name = 6; | ||
string email = 7; | ||
enum CustomerType { | ||
PERSONAL = 0; | ||
BUSINESS = 1; | ||
} | ||
CustomerType customer_type = 8; | ||
int32 revision = 9; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
syntax = "proto3"; | ||
package fake_models; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
import "customer.proto"; | ||
import "address.proto"; | ||
option go_package = "pkg/protobuf"; | ||
|
||
message Order { | ||
int32 version = 1; | ||
string id = 2; | ||
google.protobuf.Timestamp created_at = 3; | ||
google.protobuf.Timestamp last_updated_at = 4; | ||
google.protobuf.Timestamp delivered_at = 5; | ||
google.protobuf.Timestamp completed_at = 6; | ||
|
||
Customer Customer = 7; | ||
int32 OrderValue = 8; | ||
|
||
message LineItem { | ||
string article_id = 1; | ||
string name = 2; | ||
int32 quantity = 3; | ||
string quantity_unit = 4; | ||
int32 unit_price = 5; | ||
int32 total_price = 6; | ||
} | ||
repeated LineItem line_items = 9; | ||
|
||
message Payment { | ||
string payment_id = 1; | ||
string method = 2; | ||
} | ||
Payment payment = 10; | ||
Address delivery_address = 11; | ||
int32 revision = 12; | ||
} |