@@ -2,24 +2,24 @@ syntax = "proto3";
22
33package core.v1 ;
44
5+ import "google/protobuf/timestamp.proto" ;
6+
7+ option csharp_namespace = "GeniusTechSpace.Protobuf.Core.V1" ;
58option go_package = "github.com/geniustechspace/protobuf/gen/go/core/v1;corev1" ;
69option java_multiple_files = true ;
710option java_package = "com.geniustechspace.protobuf.core.v1" ;
8- option csharp_namespace = "GeniusTechSpace.Protobuf.Core.V1" ;
9-
10- import "google/protobuf/timestamp.proto" ;
1111
1212// TenantContext provides multi-tenant isolation for all requests
1313message TenantContext {
1414 // Unique identifier for the tenant
1515 string tenant_id = 1 ;
16-
16+
1717 // Tenant name for display purposes
1818 string tenant_name = 2 ;
19-
19+
2020 // Tenant tier (free, pro, enterprise)
2121 string tier = 3 ;
22-
22+
2323 // Tenant status (active, suspended, deleted)
2424 string status = 4 ;
2525}
@@ -28,25 +28,25 @@ message TenantContext {
2828message Metadata {
2929 // Unique identifier
3030 string id = 1 ;
31-
31+
3232 // Creation timestamp
3333 google.protobuf.Timestamp created_at = 2 ;
34-
34+
3535 // Last update timestamp
3636 google.protobuf.Timestamp updated_at = 3 ;
37-
37+
3838 // ID of user who created the entity
3939 string created_by = 4 ;
40-
40+
4141 // ID of user who last updated the entity
4242 string updated_by = 5 ;
43-
43+
4444 // Version for optimistic locking
4545 int64 version = 6 ;
46-
46+
4747 // Soft delete flag
4848 bool deleted = 7 ;
49-
49+
5050 // Deletion timestamp
5151 google.protobuf.Timestamp deleted_at = 8 ;
5252}
@@ -55,13 +55,13 @@ message Metadata {
5555message PaginationRequest {
5656 // Page number (0-indexed)
5757 int32 page = 1 ;
58-
58+
5959 // Number of items per page
6060 int32 page_size = 2 ;
61-
61+
6262 // Sort field
6363 string sort_by = 3 ;
64-
64+
6565 // Sort order (asc, desc)
6666 string sort_order = 4 ;
6767}
@@ -70,19 +70,19 @@ message PaginationRequest {
7070message PaginationResponse {
7171 // Current page number
7272 int32 page = 1 ;
73-
73+
7474 // Number of items per page
7575 int32 page_size = 2 ;
76-
76+
7777 // Total number of items
7878 int64 total_items = 3 ;
79-
79+
8080 // Total number of pages
8181 int32 total_pages = 4 ;
82-
82+
8383 // Has next page
8484 bool has_next = 5 ;
85-
85+
8686 // Has previous page
8787 bool has_previous = 6 ;
8888}
@@ -109,7 +109,7 @@ message ContactInfo {
109109message Money {
110110 // Currency code (ISO 4217)
111111 string currency = 1 ;
112-
112+
113113 // Amount in smallest currency unit (e.g., cents)
114114 int64 amount = 2 ;
115115}
@@ -118,13 +118,13 @@ message Money {
118118message ErrorDetail {
119119 // Error code
120120 string code = 1 ;
121-
121+
122122 // Human-readable error message
123123 string message = 2 ;
124-
124+
125125 // Field that caused the error
126126 string field = 3 ;
127-
127+
128128 // Additional error metadata
129129 map <string , string > metadata = 4 ;
130130}
@@ -133,16 +133,16 @@ message ErrorDetail {
133133message ErrorResponse {
134134 // HTTP status code
135135 int32 status = 1 ;
136-
136+
137137 // Error message
138138 string message = 2 ;
139-
139+
140140 // Detailed error information
141141 repeated ErrorDetail details = 3 ;
142-
142+
143143 // Request ID for tracking
144144 string request_id = 4 ;
145-
145+
146146 // Timestamp of the error
147147 google.protobuf.Timestamp timestamp = 5 ;
148148}
0 commit comments