syntax = "proto3"; package ir.hs.sepidar.mainserviceapi.modules.accounting.coa2.coa2pb;…
- User
syntax = "proto3";
package ir.hs.sepidar.mainserviceapi.modules.accounting.coa2.coa2pb; option go_package = "hs.ir/sepidar/mainserviceapi/modules/accounting/coa2/coa2pb";
import "google/protobuf/timestamp.proto"; import "google/protobuf/Empty.proto"; import "google/protobuf/wrappers.proto";
message AccAccount { int64 id = 1; string code = 2; string title = 3; string title2 = 4; Options options = 6; google.protobuf.Timestamp updated_at = 7; }
message AccAccountForSave { AccAccount model = 1; }
message FetchForEditResponse { AccAccount model = 1; }
message Options { bool has_balance_type_check = 1; bool has_currency = 2; bool has_currency_conversion = 3; bool has_tracking = 4; }
message IDVersion { int64 id = 1; google.protobuf.Timestamp updated_at = 2; }
message IDVersionList { repeated IDVersion ids = 1; }
message SaveRequest { AccAccount model = 1; }
service AccAccountService { rpc FetchForEdit (google.protobuf.Int64Value) returns (FetchForEditResponse); rpc Delete (IDVersionList) returns (google.protobuf.Empty); rpc Update (SaveRequest) returns (IDVersion); rpc Insert (SaveRequest) returns (IDVersion); } write json samples of body for update and insert requests
- Assistant
Update Request JSON Body Sample:
{ "model": { "id": 1234, "code": "ABC123", "title": "Account Title", "title2": "Account Title 2", "options": { "has_balance_type_check": true, "has_currency": false, "has_currency_conversion": true, "has_tracking": false }, "updated_at": { "seconds": 1638346771, "nanos": 0 } } }
Insert Request JSON Body Sample:
{ "model": { "code": "DEF456", "title": "New Account Title", "title2": "New Account Title 2" } }