package models import ( "LAPP_GAAS_GFrame_BACKEND/db" ) /*** *CreateBy:lou *Date:2020/5/15 *TableName:车间表 **********/ type Planttab struct { Pid int `xorm:"not null pk comment('车间编号') INT(0)" form:"pid" json:"pid"` Descr string `xorm:"comment('描述') VARCHAR(40)" form:"descr" json:"descr"` Createtime string `xorm:"comment('创建时间') VARCHAR(14)" form:"createtime" json:"createtime"` Lastmodifytime string `xorm:"comment('最近一次更新时间') VARCHAR(14)" form:"lastmodifytime" json:"lastmodifytime"` Lastmodify string `xorm:"comment('最近一次更新人员') VARCHAR(40)" form:"lastmodify" json:"lastmodify"` } func GetPlants() ([]*Planttab, error) { e := db.Eloquent.Master() plants := make([]*Planttab, 0) err := e.Find(&plants) return plants, err }