syntax = "proto3"; package finance.api.inner; import "buf/validate/validate.proto"; import "finance/financev1/model.proto"; import "finance/financev1/global.proto"; option go_package = "./finance/financev1;financev1"; // 付款单模块 service PaymentOrder { // 创建付款单 rpc CreatePaymentOrder (CreatePaymentOrderRequest) returns (CreatePaymentOrderReply); // 更新付款单 rpc UpdatePaymentOrder (UpdatePaymentOrderRequest) returns (UpdatePaymentOrderReply); // 获取付款单 rpc GetPaymentOrder (GetPaymentOrderRequest) returns (GetPaymentOrderReply); // 获取付款单列表 rpc ListPaymentOrder (ListPaymentOrderRequest) returns (ListPaymentOrderReply); // 更新回单状态 rpc UpdateReceiptOrderStatus (UpdateReceiptOrderStatusRequest) returns (UpdateReceiptOrderStatusReply); // 下载回单数据 rpc DownloadReceiptOrder (DownloadReceiptOrderRequest) returns (DownloadReceiptOrderReply); } // 创建付款单 message CreatePaymentOrderRequest { // 供应商ID uint32 supplierId = 1 [(buf.validate.field).cel = { message: "必须选择供应商" expression: "this > 0" }]; // 金额 double amount = 2 [(buf.validate.field).cel = { message: "金额必须填写" expression: "this > 0" }]; // 备注 string remark = 3 [(buf.validate.field).cel = { message: "备注最大支持录入200字" expression: "this.size() <= 200" }]; // 标签 uint32 tag = 4 [(buf.validate.field).cel = { message: "标签必须填写" expression: "this > 0" }]; // 明细 repeated PaymentOrderDetailInfoItem items = 5 [(buf.validate.field).cel = { message: "明细必须填写" expression: "this.size() > 0" }, (buf.validate.field).cel = { message: "明细最多支持录入5条" expression: "this.size() <= 5" }]; // 企业主体 uint32 subjectId = 6 [(buf.validate.field).cel = { message: "企业主体必须填写" expression: "this > 0" }]; // 记账账户 string creditedAccount = 7 [(buf.validate.field).cel = { message: "付款账户必须填写" expression: "this.size() > 0" }]; // 主体账户 string subjectAccount = 8 [(buf.validate.field).cel = { message: "主体账户必须填写" expression: "this.size() > 0" }]; BankItem creditedBank = 9 [(buf.validate.field).required = true]; // 创建者 uint32 creatorId = 10; // 创建者名称 string creatorName = 11; // 用途 string purpose = 12 [(buf.validate.field).cel = { message: "用途必须填写" expression: "this.size() > 0" }, (buf.validate.field).cel = { message: "用途长度不能超过100" expression: "this.size() <= 100" }]; // 摘要 string summary = 13 [(buf.validate.field).cel = { message: "摘要长度不能超过100" expression: "this.size() <= 100" }]; } // 创建付款单回复 message CreatePaymentOrderReply {} // 更新付款单 message UpdatePaymentOrderRequest { // 编号 uint32 id = 1 [(buf.validate.field).cel = { message: "编号必须填写" expression: "this > 0" }]; } // 更新付款单回复 message UpdatePaymentOrderReply {} // 获取付款单 message GetPaymentOrderRequest { // 编号 uint32 id = 1 [(buf.validate.field).cel = { message: "编号必须填写" expression: "this > 0" }]; // 创建者 uint32 creatorId = 2; } // 获取付款单回复 message GetPaymentOrderReply { // 详情 PaymentOrderItem detail = 1; } // 获取付款单列表 message ListPaymentOrderRequest { // 分页 PageReq page = 1; // 单据创建时间 TimeRangeReq createdAt = 2; // 企业账户 string subjectAccount = 3; // 企业主体 uint32 subjectId = 4; // 供应商 uint32 supplierId = 5; // 标签 uint32 tag = 6; // 创建者 uint32 creatorId = 7; } // 获取付款单列表回复 message ListPaymentOrderReply { // 列表 repeated PaymentOrderItem list = 1; // 分页 PageReply page = 2; } message UpdateReceiptOrderStatusRequest { // 编号 uint32 id = 1 [(buf.validate.field).cel = { message: "编号必须填写" expression: "this > 0" }]; } message UpdateReceiptOrderStatusReply {} message DownloadReceiptOrderRequest { // 编号 uint32 id = 1 [(buf.validate.field).cel = { message: "编号必须填写" expression: "this > 0" }]; } message DownloadReceiptOrderReply { // 文件链接 string file = 1; }