package model import "time" // 脖环出厂登记 type Factory struct { Id int64 `xorm:"pk autoincr 'id'"` Pastureid string `xorm:"varchar(80) 'FARM_UUID'"` //牧场id Count int64 `xorm:"int(11) 'count'"` //出厂数量 Batch string `xorm:"varchar(30) 'batch'"` //出厂批次 Genre int64 `xorm:"int(1) 'genre'"` //0 购买,1 置换 2召回 Recall int64 `xorm:"int(11) 'recall'"` //关联召回批次数 CreateName string `xorm:"varchar(30) 'createname'"` //登记人 CreateTime time.Time `xorm:"DATETIME 'createtime'"` //登记时间 } func (s *Factory) TableName() string { return "factory" } type FactoryList struct { Factory `xorm:"extends"` PastureName string `xorm:"FARM_NAME"` }