model_object_attr_info.go 2.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. package viewmodel
  2. import "encoding/json"
  3. type ModelObjectAttrInfo struct {
  4. ModelId int64 `json:"modelId" xorm:"'model_id' bigint pk comment('主键ID') "`
  5. ObjectId int64 `json:"objectId" xorm:"'object_id' bigint pk comment('主键ID') "`
  6. ObjectCode string `json:"objectCode" xorm:"'object_code' varchar(127) comment('ObjectCode') "`
  7. AttrId int64 `json:"attrId" xorm:"'attr_id' bigint pk comment('主键ID') "`
  8. AttrTitle string `json:"attrTitle" xorm:"'attr_title' varchar(127) comment('AttrTitle') "`
  9. AttrCode string `json:"attrCode" xorm:"'attr_code' varchar(127) comment('AttrCode') "`
  10. JsonCode string `json:"jsonCode" xorm:"'json_code' varchar(127) comment('JsonCode') "`
  11. StructCode string `json:"structCode" xorm:"'struct_code' varchar(127) comment('StructCode') "`
  12. AttrType int64 `json:"attrType" xorm:"'attr_type' bigint comment('Type') "`
  13. AttrLength int64 `json:"attrLength" xorm:"'attr_length' bigint comment('attrLength') "`
  14. AttrDecimals int64 `json:"attrDecimals" xorm:"'attr_decimals' bigint comment('attrDecimals') "`
  15. Comment string `json:"comment" xorm:"'comment' varchar(255) comment('描述') "`
  16. IsFixed int64 `json:"isFixed" xorm:"'is_fixed' int comment('是否可修改') "`
  17. IsNotNull int64 `json:"isNotNull" xorm:"'is_not_null' int comment('是否可修改') "`
  18. IsPKey int64 `json:"isPKey" xorm:"'is_pkey' int comment('是否可修改') "`
  19. SortNo int64 `json:"sortNo" xorm:"'sort_no' int comment('是否可修改') "`
  20. }
  21. func (t *ModelObjectAttrInfo) TableName() string {
  22. return "ds_object_attr"
  23. }
  24. func (t *ModelObjectAttrInfo) MarshalBinary() (data []byte, err error){
  25. return json.Marshal(t)
  26. }
  27. func (t *ModelObjectAttrInfo) UnmarshalBinary(data []byte) (err error){
  28. return json.Unmarshal(data, t)
  29. }