123456789101112131415161718192021222324252627 |
- package supply_analysis
- import (
- "eta_gn/eta_index_lib/global"
- "time"
- )
- // Variety variety 品种表
- type Variety struct {
- VarietyId int `gorm:"primaryKey;autoIncrement;column:variety_id" description:"品种ID"`
- VarietyName string `gorm:"column:variety_name" description:"品种名称"`
- LastUpdateSysUserId int `gorm:"column:last_update_sys_user_id" description:"最后更新人id"`
- LastUpdateSysUserRealName string `gorm:"column:last_update_sys_user_real_name" description:"最后更新人名称"`
- ProductionDay int `gorm:"column:production_day" description:"生产天数"`
- SysUserId int `gorm:"column:sys_user_id" description:"创建人id"`
- SysUserRealName string `gorm:"column:sys_user_real_name" description:"创建人姓名"`
- ModifyTime time.Time `gorm:"column:modify_time" description:"修改时间"`
- CreateTime time.Time `gorm:"column:create_time" description:"创建时间"`
- }
- // GetVarietyById 根据品种id获取品种详情
- func GetVarietyById(id int) (item *Variety, err error) {
- sql := `SELECT * FROM variety WHERE variety_id = ?`
- err = global.DEFAULT_DmSQL.Raw(sql, id).First(&item).Error
- return
- }
|