package model import "time" // ZSPFreightCharges 货代费用表 type ZSPFreightCharges struct { ID uint `gorm:"primaryKey" json:"id"` BillOfLading string `gorm:"size:100;index" json:"billOfLading"` ContractNumber string `gorm:"size:100;index" json:"contractNumber"` ExpenseItem string `gorm:"size:200;not null" json:"expenseItem"` Amount float64 `gorm:"type:decimal(16,4);not null" json:"amount"` Currency string `gorm:"size:10;default:'CNY'" json:"currency"` PaymentDate time.Time `gorm:"not null" json:"paymentDate"` FreightCompanyName string `gorm:"size:200;not null" json:"freightCompanyName"` Remark string `gorm:"size:500" json:"remark"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` } // ZSPMiscCharges 其他杂费表 type ZSPMiscCharges struct { ID uint `gorm:"primaryKey" json:"id"` BillOfLading string `gorm:"size:100;index" json:"billOfLading"` ContractNumber string `gorm:"size:100;index" json:"contractNumber"` ExpenseItem string `gorm:"size:200;not null" json:"expenseItem"` Amount float64 `gorm:"type:decimal(16,4);not null" json:"amount"` Currency string `gorm:"size:10;default:'CNY'" json:"currency"` PaymentDate time.Time `gorm:"not null" json:"paymentDate"` CompanyName string `gorm:"size:200" json:"companyName"` Remark string `gorm:"size:500" json:"remark"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` } // ZSPServiceFees 服务费表 type ZSPServiceFees struct { ID uint `gorm:"primaryKey" json:"id"` BillOfLading string `gorm:"size:100;index" json:"billOfLading"` ContractNumber string `gorm:"size:100;index" json:"contractNumber"` Name string `gorm:"size:100;not null" json:"name"` Amount float64 `gorm:"type:decimal(16,4);not null" json:"amount"` Currency string `gorm:"size:10;default:'CNY'" json:"currency"` Date time.Time `gorm:"not null" json:"date"` Remark string `gorm:"size:500" json:"remark"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` } // ZSPCostBreakdown 成本构成明细表 type ZSPCostBreakdown struct { ID uint `gorm:"primaryKey" json:"id"` BusinessID string `gorm:"size:100;not null;index" json:"businessId"` BusinessType string `gorm:"size:50;not null;index" json:"businessType"` TotalCost float64 `gorm:"type:decimal(16,4);not null" json:"totalCost"` FreightChargeTotal float64 `gorm:"type:decimal(16,4);default:0" json:"freightChargeTotal"` MiscChargeTotal float64 `gorm:"type:decimal(16,4);default:0" json:"miscChargeTotal"` ServiceFeeTotal float64 `gorm:"type:decimal(16,4);default:0" json:"serviceFeeTotal"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` } // ZSPProfitRecord 利润记录表 type ZSPProfitRecord struct { ID uint `gorm:"primaryKey" json:"id"` BusinessID string `gorm:"size:100;not null;index" json:"businessId"` BusinessType string `gorm:"size:50;not null;index" json:"businessType"` Revenue float64 `gorm:"type:decimal(16,4);not null" json:"revenue"` TotalCost float64 `gorm:"type:decimal(16,4);not null" json:"totalCost"` Profit float64 `gorm:"type:decimal(16,4);not null" json:"profit"` ProfitRate float64 `gorm:"type:decimal(8,4)" json:"profitRate"` RecordDate time.Time `gorm:"not null" json:"recordDate"` Remark string `gorm:"size:500" json:"remark"` CreateTime time.Time `json:"createTime"` UpdateTime time.Time `json:"updateTime"` }