|
@@ -9,35 +9,36 @@ import (
|
|
|
|
|
|
// ContractRegister 合同登记表
|
|
|
type ContractRegister struct {
|
|
|
- ContractRegisterId int `gorm:"primaryKey;column:contract_register_id" json:"contract_register_id" description:"登记ID"`
|
|
|
- ContractCode string `gorm:"column:contract_code" json:"contract_code" description:"合同编号"`
|
|
|
- RelateContractCode string `gorm:"column:relate_contract_code" json:"relate_contract_code" description:"关联合同编号"`
|
|
|
- CrmContractId int `gorm:"column:crm_contract_id" json:"crm_contract_id" description:"CRM系统-合同ID"`
|
|
|
- ContractSource int `gorm:"column:contract_source" json:"contract_source" description:"合同来源: 0-非系统合同导入; 1-CRM合同导入"`
|
|
|
- CompanyName string `gorm:"column:company_name" json:"company_name" description:"客户名称"`
|
|
|
- ActualCompanyName string `gorm:"column:actual_company_name" json:"actual_company_name" description:"实际使用方"`
|
|
|
- ProductIds string `gorm:"column:product_ids" json:"product_ids" description:"产品ID:1-FICC; 2-权益, 如果两者都有,则用英文逗号拼接"`
|
|
|
- SellerId int `gorm:"column:seller_id" json:"seller_id" description:"CRM系统-销售ID"`
|
|
|
- SellerName string `gorm:"column:seller_name" json:"seller_name" description:"CRM系统-销售名称"`
|
|
|
- RaiSellerId int `gorm:"column:rai_seller_id" json:"rai_seller_id" description:"CRM系统-权益销售ID"`
|
|
|
- RaiSellerName string `gorm:"column:rai_seller_name" json:"rai_seller_name" description:"CRM系统-权益销售名称"`
|
|
|
- ContractType int `gorm:"column:contract_type" json:"contract_type" description:"合同类型: 1-新签; 2-续约; 3-代付; 4-补充协议"`
|
|
|
- ContractAmount float64 `gorm:"column:contract_amount" json:"contract_amount" description:"合同金额"`
|
|
|
- InvoicedAmount float64 `gorm:"column:invoiced_amount" json:"invoiced_amount" description:"开票金额"`
|
|
|
- PaymentAmount float64 `gorm:"column:payment_amount" json:"payment_amount" description:"到款金额"`
|
|
|
- CurrencyUnit string `gorm:"column:currency_unit" json:"currency_unit" description:"货币国际代码"`
|
|
|
- RMBRate float64 `gorm:"column:rmb_rate" json:"rmb_rate" description:"人民币汇率(create_time当日)"`
|
|
|
- StartDate time.Time `gorm:"column:start_date" json:"start_date" description:"合同开始日期"`
|
|
|
- EndDate time.Time `gorm:"column:end_date" json:"end_date" description:"合同结束日期"`
|
|
|
- SignDate time.Time `gorm:"column:sign_date" json:"sign_date" description:"合同签订日期"`
|
|
|
- AgreedPayTime string `gorm:"column:agreed_pay_time" json:"agreed_pay_time" description:"约定付款时间(如:生效日起10日内)"`
|
|
|
- ContractStatus int `gorm:"column:contract_status" json:"contract_status" description:"合同状态: 1-已审批; 2-单章寄出; 3-已签回"`
|
|
|
- RegisterStatus int `gorm:"column:register_status" json:"register_status" description:"登记状态: 1-进行中; 2-已完成;"`
|
|
|
- Remark string `gorm:"column:remark" json:"remark" description:"备注信息"`
|
|
|
- ServiceRemark string `gorm:"column:service_remark" json:"service_remark" description:"套餐备注信息"`
|
|
|
- HasPayment int `gorm:"column:has_payment" json:"has_payment" description:"是否有代付: 0-无; 1-有"`
|
|
|
- NewCompany int `gorm:"column:new_company" json:"new_company" description:"是否为新客户: 0-否; 1-是"`
|
|
|
- IsDeleted int `gorm:"column:is_deleted" json:"is_deleted" description:"是否已删除: 0-正常; 1-已删除"`
|
|
|
+ ContractRegisterId int `gorm:"primaryKey;column:contract_register_id" json:"contract_register_id" description:"登记ID"`
|
|
|
+ ContractCode string `gorm:"column:contract_code" json:"contract_code" description:"合同编号"`
|
|
|
+ RelateContractCode string `gorm:"column:relate_contract_code" json:"relate_contract_code" description:"关联合同编号"`
|
|
|
+ RelateContractMainCode string `gorm:"column:relate_contract_main_code" json:"relate_contract_main_code" description:"关联主合同编号"`
|
|
|
+ CrmContractId int `gorm:"column:crm_contract_id" json:"crm_contract_id" description:"CRM系统-合同ID"`
|
|
|
+ ContractSource int `gorm:"column:contract_source" json:"contract_source" description:"合同来源: 0-非系统合同导入; 1-CRM合同导入"`
|
|
|
+ CompanyName string `gorm:"column:company_name" json:"company_name" description:"客户名称"`
|
|
|
+ ActualCompanyName string `gorm:"column:actual_company_name" json:"actual_company_name" description:"实际使用方"`
|
|
|
+ ProductIds string `gorm:"column:product_ids" json:"product_ids" description:"产品ID:1-FICC; 2-权益, 如果两者都有,则用英文逗号拼接"`
|
|
|
+ SellerId int `gorm:"column:seller_id" json:"seller_id" description:"CRM系统-销售ID"`
|
|
|
+ SellerName string `gorm:"column:seller_name" json:"seller_name" description:"CRM系统-销售名称"`
|
|
|
+ RaiSellerId int `gorm:"column:rai_seller_id" json:"rai_seller_id" description:"CRM系统-权益销售ID"`
|
|
|
+ RaiSellerName string `gorm:"column:rai_seller_name" json:"rai_seller_name" description:"CRM系统-权益销售名称"`
|
|
|
+ ContractType int `gorm:"column:contract_type" json:"contract_type" description:"合同类型: 1-新签; 2-续约; 3-代付; 4-补充协议"`
|
|
|
+ ContractAmount float64 `gorm:"column:contract_amount" json:"contract_amount" description:"合同金额"`
|
|
|
+ InvoicedAmount float64 `gorm:"column:invoiced_amount" json:"invoiced_amount" description:"开票金额"`
|
|
|
+ PaymentAmount float64 `gorm:"column:payment_amount" json:"payment_amount" description:"到款金额"`
|
|
|
+ CurrencyUnit string `gorm:"column:currency_unit" json:"currency_unit" description:"货币国际代码"`
|
|
|
+ RMBRate float64 `gorm:"column:rmb_rate" json:"rmb_rate" description:"人民币汇率(create_time当日)"`
|
|
|
+ StartDate time.Time `gorm:"column:start_date" json:"start_date" description:"合同开始日期"`
|
|
|
+ EndDate time.Time `gorm:"column:end_date" json:"end_date" description:"合同结束日期"`
|
|
|
+ SignDate time.Time `gorm:"column:sign_date" json:"sign_date" description:"合同签订日期"`
|
|
|
+ AgreedPayTime string `gorm:"column:agreed_pay_time" json:"agreed_pay_time" description:"约定付款时间(如:生效日起10日内)"`
|
|
|
+ ContractStatus int `gorm:"column:contract_status" json:"contract_status" description:"合同状态: 1-已审批; 2-单章寄出; 3-已签回"`
|
|
|
+ RegisterStatus int `gorm:"column:register_status" json:"register_status" description:"登记状态: 1-进行中; 2-已完成;"`
|
|
|
+ Remark string `gorm:"column:remark" json:"remark" description:"备注信息"`
|
|
|
+ ServiceRemark string `gorm:"column:service_remark" json:"service_remark" description:"套餐备注信息"`
|
|
|
+ HasPayment int `gorm:"column:has_payment" json:"has_payment" description:"是否有代付: 0-无; 1-有"`
|
|
|
+ NewCompany int `gorm:"column:new_company" json:"new_company" description:"是否为新客户: 0-否; 1-是"`
|
|
|
+ IsDeleted int `gorm:"column:is_deleted" json:"is_deleted" description:"是否已删除: 0-正常; 1-已删除"`
|
|
|
base.TimeBase
|
|
|
}
|
|
|
|
|
@@ -104,7 +105,7 @@ type ContractRegisterListReq struct {
|
|
|
ServiceTypes string `json:"service_types" form:"service_types" description:"套餐类型"`
|
|
|
ContractType int `json:"contract_type" form:"contract_type" description:"合同类型"`
|
|
|
RegisterStatus int `json:"register_status" form:"register_status" description:"登记状态"`
|
|
|
- ListParam int `json:"list_param" form:"list_param" description:"套餐类型: 0-全部; 1-ficc; 2-权益"`
|
|
|
+ ListParam int `json:"list_param" form:"list_param" description:"套餐类型: 0-全部; 1-ficc; 2-权益"`
|
|
|
base.PageReq
|
|
|
}
|
|
|
|
|
@@ -145,9 +146,10 @@ type ContractRegisterItem struct {
|
|
|
// ContractRegisterList 合同登记列表
|
|
|
type ContractRegisterList struct {
|
|
|
*ContractRegisterItem
|
|
|
- ServicesName string `json:"services" description:"套餐名称"`
|
|
|
- InvoiceList []*ContractInvoiceItem `json:"invoice_list" description:"开票信息"`
|
|
|
- PaymentList []*ContractInvoiceItem `json:"payment_list" description:"到款信息"`
|
|
|
+ ContractTypeString string `json:"contract_type_string" description:"合同类型"`
|
|
|
+ ServicesName string `json:"services" description:"套餐名称"`
|
|
|
+ InvoiceList []*ContractInvoiceItem `json:"invoice_list" description:"开票信息"`
|
|
|
+ PaymentList []*ContractInvoiceItem `json:"payment_list" description:"到款信息"`
|
|
|
}
|
|
|
|
|
|
// ContractRegisterDelReq 合同登记-删除请求体
|
|
@@ -163,30 +165,31 @@ type ContractRegisterUpdateStatusReq struct {
|
|
|
|
|
|
// ContractRegisterAddReq 新增合同登记请求体
|
|
|
type ContractRegisterAddReq struct {
|
|
|
- ContractCode string `json:"contract_code" binding:"required" description:"合同编号"`
|
|
|
- RelateContractCode string `json:"relate_contract_code" description:"关联合同编号"`
|
|
|
- CrmContractId int `json:"crm_contract_id" description:"CRM系统-合同ID"`
|
|
|
- ContractSource int `json:"contract_source" binding:"oneof=0 1" description:"合同来源: 0-非系统合同导入; 1-CRM合同导入"`
|
|
|
- CompanyName string `json:"company_name" binding:"required" description:"客户名称"`
|
|
|
- ActualCompanyName string `json:"actual_company_name" description:"实际使用方"`
|
|
|
- SellerIds string `json:"seller_ids" binding:"required" description:"CRM系统-销售ID"`
|
|
|
- ContractType int `json:"contract_type" binding:"oneof=1 2 3 4" description:"合同类型: 1-新签; 2-续约; 3-代付; 4-补充协议"`
|
|
|
- ContractAmount float64 `json:"contract_amount" binding:"required" description:"合同金额"`
|
|
|
- CurrencyUnit string `json:"currency_unit" binding:"required" description:"货币单位"`
|
|
|
- StartDate string `json:"start_date" binding:"required" description:"合同开始日期"`
|
|
|
- EndDate string `json:"end_date" binding:"required" description:"合同结束日期"`
|
|
|
- SignDate string `json:"sign_date" description:"合同签订日期"`
|
|
|
- AgreedPayTime string `json:"agreed_pay_time" description:"约定付款时间(如:生效日起10日内)"`
|
|
|
- ContractStatus int `json:"contract_status" binding:"oneof=1 2 3 4 5" description:"合同状态: 1-已审批; 2-单章寄出; 3-已签回; 4-已终止; 5-邮件备案"`
|
|
|
- Remark string `json:"remark" description:"备注信息"`
|
|
|
- ProductIds string `json:"product_ids" description:"产品ID:1-FICC; 2-权益, 如果两者都有,则用英文逗号拼接"`
|
|
|
- ServiceRemark string `json:"service_remark" description:"套餐备注"`
|
|
|
- HasPayment int `json:"has_payment" description:"是否有代付: 0-无; 1-有"`
|
|
|
- NewCompany int `json:"new_company" description:"是否为新客户: 0-否; 1-是"`
|
|
|
- Supplement int `json:"supplement" description:"是否为补录合同: 0-否; 1-是"`
|
|
|
- PrePayId int `json:"pre_pay_id" description:"预到款信息ID"`
|
|
|
- Services []ContractServiceAddReq `json:"services" description:"服务套餐内容"`
|
|
|
- ServiceAmount []ContractServiceAmountAddReq `json:"service_amount" description:"服务套餐金额"`
|
|
|
+ ContractCode string `json:"contract_code" binding:"required" description:"合同编号"`
|
|
|
+ RelateContractCode string `json:"relate_contract_code" description:"关联合同编号"`
|
|
|
+ RelateContractMainCode string `json:"relate_contract_main_code" description:"关联主合同编号"`
|
|
|
+ CrmContractId int `json:"crm_contract_id" description:"CRM系统-合同ID"`
|
|
|
+ ContractSource int `json:"contract_source" binding:"oneof=0 1" description:"合同来源: 0-非系统合同导入; 1-CRM合同导入"`
|
|
|
+ CompanyName string `json:"company_name" binding:"required" description:"客户名称"`
|
|
|
+ ActualCompanyName string `json:"actual_company_name" description:"实际使用方"`
|
|
|
+ SellerIds string `json:"seller_ids" binding:"required" description:"CRM系统-销售ID"`
|
|
|
+ ContractType int `json:"contract_type" binding:"oneof=1 2 3 4" description:"合同类型: 1-新签; 2-续约; 3-代付; 4-补充协议"`
|
|
|
+ ContractAmount float64 `json:"contract_amount" binding:"required" description:"合同金额"`
|
|
|
+ CurrencyUnit string `json:"currency_unit" binding:"required" description:"货币单位"`
|
|
|
+ StartDate string `json:"start_date" binding:"required" description:"合同开始日期"`
|
|
|
+ EndDate string `json:"end_date" binding:"required" description:"合同结束日期"`
|
|
|
+ SignDate string `json:"sign_date" description:"合同签订日期"`
|
|
|
+ AgreedPayTime string `json:"agreed_pay_time" description:"约定付款时间(如:生效日起10日内)"`
|
|
|
+ ContractStatus int `json:"contract_status" binding:"oneof=1 2 3 4 5" description:"合同状态: 1-已审批; 2-单章寄出; 3-已签回; 4-已终止; 5-邮件备案"`
|
|
|
+ Remark string `json:"remark" description:"备注信息"`
|
|
|
+ ProductIds string `json:"product_ids" description:"产品ID:1-FICC; 2-权益, 如果两者都有,则用英文逗号拼接"`
|
|
|
+ ServiceRemark string `json:"service_remark" description:"套餐备注"`
|
|
|
+ HasPayment int `json:"has_payment" description:"是否有代付: 0-无; 1-有"`
|
|
|
+ NewCompany int `json:"new_company" description:"是否为新客户: 0-否; 1-是"`
|
|
|
+ Supplement int `json:"supplement" description:"是否为补录合同: 0-否; 1-是"`
|
|
|
+ PrePayId int `json:"pre_pay_id" description:"预到款信息ID"`
|
|
|
+ Services []ContractServiceAddReq `json:"services" description:"服务套餐内容"`
|
|
|
+ ServiceAmount []ContractServiceAmountAddReq `json:"service_amount" description:"服务套餐金额"`
|
|
|
}
|
|
|
|
|
|
// ContractRegisterEditReq 编辑合同登记请求体
|