organization.go 849 B

123456789101112131415161718
  1. // 自动生成模板Organization
  2. package autocode
  3. // Organization 结构体
  4. // 如果含有time.Time 请自行import time包
  5. type Organization struct {
  6. CODE string `json:"code" form:"code" gorm:"column:CODE;comment:;type:varchar(20);"`
  7. NAME string `json:"name" form:"name" gorm:"column:NAME;comment:;type:varchar(50);"`
  8. PARENTCODE string `json:"parentcode" form:"parentcode" gorm:"column:PARENT_CODE;comment:;type:varchar(20);"`
  9. Optimistic *int `json:"optimistic" form:"optimistic" gorm:"column:optimistic;comment:;type:int"`
  10. Postition string `json:"postition" form:"postition" gorm:"column:postition;comment:;type:varchar(225);"`
  11. Children []Organization `json:"children" gorm:"-"`
  12. }
  13. // TableName Organization 表名
  14. func (Organization) TableName() string {
  15. return "organization"
  16. }