This commit is contained in:
邹宗楠
2025-08-12 17:52:30 +08:00
parent 5c14110da0
commit 14b6c34652
9 changed files with 236 additions and 26 deletions

View File

@@ -0,0 +1,31 @@
package model
type InvoiceMsg struct {
ModelIDCUL
OrderId string `orm:"column(order_id);size(32)" json:"order_id"` // 订单ID
StoreID int `orm:"column(store_id)" json:"storeID"` // 外部系统里记录的 jxstoreid
VendorID int `orm:"column(vendor_id);size(2)" json:"vendorID"` // 平台ID
InvoiceTaskId string `orm:"column(invoice_task_id);size(64)" json:"invoiceTaskId"` // 任务ID
PushType int `orm:"column(push_type);size(2)" json:"pushType"` // 消息类型1-开发票3-催发票
InvoiceTitle string `orm:"column(invoice_title);size(256)" json:"invoiceTitle"` // 发票抬头,为用户填写的开发票的抬头。
TaxpayerId string `orm:"column(taxpayer_id);size(32)" json:"taxpayerId"` // 纳税人识别号
NeedInvoiceByCategory int `orm:"column(need_category);size(2)" json:"needCategory"` // 是否需要按大类开票1-需要按大类开票2-需要商品明细开票;如果用户端没有选择,默认是按照明细开票
CompanyAddress string `orm:"column(company_address);size(256)" json:"companyAddress"` // 公司地址
CompanyPhone string `orm:"column(company_phone);size(16)" json:"companyPhone"` // 公司电话
AccountBank string `orm:"column(account_bank);size(64)" json:"accountBank"` // 开户银行
AccountNumber string `orm:"column(account_number);size(32)" json:"accountNumber"` // 开户账号
Email string `orm:"column(email);size(64)" json:"email"` // 邮箱
InvoiceAmount int64 `orm:"column(invoice_amount);size(16)" json:"invoiceAmount"` // 商家开票金额,单位分
InvoiceUrl string `orm:"column(invoice_url);size(512)" json:"invoiceUrl"` // 发票文件链接
InvoiceId string `orm:"column(invoice_id);size(32)" json:"invoiceId"` // 发票号码
}
func (o *InvoiceMsg) TableUnique() [][]string {
return [][]string{}
}
func (o *InvoiceMsg) TableIndex() [][]string {
return [][]string{
[]string{"CreatedAt", "StoreID"},
[]string{"OrderId"},
}
}