biz_object_attr_info.go 2.1 KB

1234567891011121314151617181920212223242526272829303132
  1. package viewmodel
  2. import "encoding/json"
  3. type BizObjectAttrInfo struct {
  4. BizId int64 `json:"bizId" xorm:"'biz_id' bigint pk comment('Biz ID') "`
  5. ObjectId int64 `json:"objectId" xorm:"'object_id' bigint pk comment('Object ID') "`
  6. ObjectCode string `json:"objectCode" xorm:"'object_code' varchar(127) comment('ObjectCode') "`
  7. AttrId int64 `json:"attrId" xorm:"'attr_id' bigint pk comment('Attr ID') "`
  8. AttrType int64 `json:"attrType" xorm:"'attr_type' bigint comment('Type') "`
  9. AttrTitle string `json:"attrTitle" xorm:"'attr_title' varchar(127) comment('AttrTitle') "`
  10. AttrCode string `json:"attrCode" xorm:"'attr_code' varchar(127) comment('AttrCode') "`
  11. MappingCode string `json:"mappingCode" xorm:"'mapping_code' varchar(127) comment('MappingCode') "`
  12. AttrLength int64 `json:"attrLength" xorm:"'attr_length' bigint comment('AttrLength') "`
  13. AttrDecimals int64 `json:"attrDecimals" xorm:"'attr_decimals' bigint comment('AttrDecimals') "`
  14. Comment string `json:"comment" xorm:"'comment' varchar(255) comment('描述') "`
  15. IsNotNull int64 `json:"isNotNull" xorm:"'is_not_null' int comment('是否可修改') "`
  16. SortNo int64 `json:"sortNo" xorm:"'sort_no' int comment('是否可修改') "`
  17. RuleId int64 `json:"ruleId" xorm:"'rule_id' int comment('Rule ID') "`
  18. }
  19. func (t *BizObjectAttrInfo) TableName() string {
  20. return "biz_object_attr"
  21. }
  22. func (t *BizObjectAttrInfo) MarshalBinary() (data []byte, err error){
  23. return json.Marshal(t)
  24. }
  25. func (t *BizObjectAttrInfo) UnmarshalBinary(data []byte) (err error){
  26. return json.Unmarshal(data, t)
  27. }