GAAS 广汽安道拓GFrame金属件MOM项目
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.

28 lines
1.4 KiB

  1. package base
  2. import (
  3. "leit.com/LAPP_GAAS_GFrame/grmi"
  4. "xorm.io/core"
  5. )
  6. //Attribute的实体映射
  7. type Attribute struct {
  8. PlantNr int `xorm:"pk int 'PlantNr'" json:"Attribute-PlantNr"`
  9. AttrCode int `xorm:"pk int 'AttrCode'" json:"Attribute-AttrCode"`
  10. AttrName string `xorm:"nvarchar(100) 'AttrName' not null" json:"Attribute-AttrName"`
  11. Descr string `xorm:"nvarchar(100) 'Descr' not null" json:"Attribute-Descr"`
  12. AttrGroup int `xorm:"int 'AttrGroup' not null" json:"Attribute-AttrGroup"`
  13. ShortCode string `xorm:"nvarchar(20) 'ShortCode' not null" json:"Attribute-ShortCode"`
  14. AttrType int `xorm:"int 'AttrType' not null" json:"Attribute-AttrType"`
  15. AttrDataType int `xorm:"int 'AttrDataType' not null" json:"Attribute-AttrDataType"`
  16. AttrValType int `xorm:"int 'AttrValType' not null" json:"Attribute-AttrValType"`
  17. ValFormat string `xorm:"nvarchar(100) 'ValFormat' not null" json:"Attribute-ValFormat"`
  18. LastModify grmi.DateTime `xorm:"datetime 'LastModify' not null updated" json:"Attribute-LastModify"`
  19. LastUser string `xorm:"nvarchar(20) 'LastUser' not null" json:"Attribute-LastUser"`
  20. CreateTime grmi.DateTime `xorm:"datetime 'CreateTime' not null created" json:"Attribute-CreateTime"`
  21. }
  22. //获取Attribute的主键
  23. func (self *Attribute) GetKey() core.PK {
  24. return core.PK{self.PlantNr, self.AttrCode}
  25. }