20 lines
831 B
Go
20 lines
831 B
Go
|
|
package models
|
|||
|
|
|
|||
|
|
import (
|
|||
|
|
"git.apinb.com/bsm-sdk/core/database"
|
|||
|
|
"time"
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
// FinSettlement 对应 fin_settlement,保存结算单。
|
|||
|
|
type FinSettlement struct {
|
|||
|
|
Entity
|
|||
|
|
SettlementNo string `gorm:"column:settlement_no;type:varchar(64);not null;uniqueIndex" json:"settlement_no"`
|
|||
|
|
SubjectType string `gorm:"column:subject_type;type:varchar(32);not null" json:"subject_type"`
|
|||
|
|
SubjectID uint64 `gorm:"column:subject_id;not null;index" json:"subject_id"`
|
|||
|
|
PeriodStart time.Time `gorm:"column:period_start;type:timestamptz;not null" json:"period_start"`
|
|||
|
|
PeriodEnd time.Time `gorm:"column:period_end;type:timestamptz;not null" json:"period_end"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
func init() { database.AppendMigrate(&FinSettlement{}) }
|
|||
|
|
func (table *FinSettlement) TableName() string { return "fin_settlement" }
|