43 lines
2.3 KiB
Go
Executable File
43 lines
2.3 KiB
Go
Executable File
package model
|
|
|
|
import "time"
|
|
|
|
// ZSPSettlement 结算单表
|
|
type ZSPSettlement struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
SettlementNumber string `gorm:"size:100;uniqueIndex;not null" json:"settlement_number"`
|
|
ContractNumber string `gorm:"size:100;index;not null" json:"contract_number"`
|
|
ContractType string `gorm:"size:50" json:"contract_type"`
|
|
CompanyName string `gorm:"size:200;not null" json:"company_name"`
|
|
Commodity string `gorm:"size:100" json:"commodity"`
|
|
Quantity float64 `gorm:"type:decimal(16,4)" json:"quantity"`
|
|
UnitPrice float64 `gorm:"type:decimal(16,4)" json:"unit_price"`
|
|
Amount float64 `gorm:"type:decimal(16,4);not null" json:"amount"`
|
|
Currency string `gorm:"size:10;default:'CNY'" json:"currency"`
|
|
SettlementDate time.Time `gorm:"not null" json:"settlement_date"`
|
|
Status string `gorm:"size:20;default:'pending'" json:"status"`
|
|
FilePath string `gorm:"size:500" json:"file_path"`
|
|
Remark string `gorm:"size:500" json:"remark"`
|
|
CreateTime time.Time `json:"create_time"`
|
|
UpdateTime time.Time `json:"update_time"`
|
|
}
|
|
|
|
// ZSPReconciliation 对账单表
|
|
type ZSPReconciliation struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
ReconciliationNumber string `gorm:"size:100;uniqueIndex;not null" json:"reconciliation_number"`
|
|
ContractNumber string `gorm:"size:100;index" json:"contract_number"`
|
|
CompanyName string `gorm:"size:200;not null" json:"company_name"`
|
|
PeriodStart time.Time `json:"period_start"`
|
|
PeriodEnd time.Time `json:"period_end"`
|
|
TotalAmount float64 `gorm:"type:decimal(16,4)" json:"total_amount"`
|
|
PaidAmount float64 `gorm:"type:decimal(16,4)" json:"paid_amount"`
|
|
UnpaidAmount float64 `gorm:"type:decimal(16,4)" json:"unpaid_amount"`
|
|
Currency string `gorm:"size:10;default:'CNY'" json:"currency"`
|
|
Status string `gorm:"size:20;default:'draft'" json:"status"`
|
|
FilePath string `gorm:"size:500" json:"file_path"`
|
|
Remark string `gorm:"size:500" json:"remark"`
|
|
CreateTime time.Time `json:"create_time"`
|
|
UpdateTime time.Time `json:"update_time"`
|
|
}
|