scrounge_company.go 500 B

1234567891011121314151617181920212223
  1. package company
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type ScroungeCompany struct {
  7. Id int `orm:"column(id);pk"`
  8. CompanyId int
  9. CompanyName string // 公司名
  10. ProductId int
  11. CreateTime time.Time // 申请时间
  12. ModifyTime time.Time // 修改时间
  13. Remark string // 备注
  14. }
  15. func GetScroungeCompany() (list []*ScroungeCompany, err error) {
  16. o := orm.NewOrm()
  17. sql := `SELECT * FROM scrounge_company `
  18. _, err = o.Raw(sql).QueryRows(&list)
  19. return
  20. }