You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
829 B

4 years ago
  1. package models
  2. import (
  3. "leit.com/LAPP_GAAS_GFrame/db"
  4. )
  5. /***
  6. *CreateBy:lou
  7. *Date:2020/5/15
  8. *TableName:车间表
  9. **********/
  10. type Planttab struct {
  11. Pid int `xorm:"not null pk comment('车间编号') INT(0)" form:"pid" json:"pid"`
  12. Descr string `xorm:"comment('描述') VARCHAR(40)" form:"descr" json:"descr"`
  13. Createtime string `xorm:"comment('创建时间') VARCHAR(14)" form:"createtime" json:"createtime"`
  14. Lastmodifytime string `xorm:"comment('最近一次更新时间') VARCHAR(14)" form:"lastmodifytime" json:"lastmodifytime"`
  15. Lastmodify string `xorm:"comment('最近一次更新人员') VARCHAR(40)" form:"lastmodify" json:"lastmodify"`
  16. }
  17. func GetPlants() ([]*Planttab, error) {
  18. e := db.Eloquent.Master()
  19. plants := make([]*Planttab, 0)
  20. err := e.Find(&plants)
  21. return plants, err
  22. }