biz_object_oam_rule_info.go 2.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. package viewmodel
  2. import "encoding/json"
  3. type BizObjectOAMRuleInfo struct {
  4. BizId int64 `json:"bizId" xorm:"'biz_id' bigint comment('BIZ ID') "`
  5. ObjectId int64 `json:"objectId" xorm:"'object_id' bigint comment('Object ID') "`
  6. ObjectTitle string `json:"objectTitle" xorm:"'object_title' varchar(127) comment('Object Title') "`
  7. ObjectCode string `json:"objectCode" xorm:"'object_code' varchar(127) comment('Object Code') "`
  8. OamId int64 `json:"oamId" xorm:"'oam_id' bigint comment('Object OAM ID') "`
  9. OamTitle string `json:"oamTitle" xorm:"'oam_title' varchar(127) comment('OAM Title') "`
  10. OamCode string `json:"oamCode" xorm:"'oam_code' varchar(127) comment('OAM Code') "`
  11. OrId int64 `json:"orId" xorm:"'or_id' bigint pk comment('Object Rule ID') "`
  12. RuleId int64 `json:"ruleId" xorm:"'rule_id' bigint comment('Rule ID') "`
  13. RuleType int64 `json:"ruleType" xorm:"'rule_type' bigint comment('Type') "`
  14. RuleTitle string `json:"ruleTitle" xorm:"'rule_title' varchar(127) comment('模型名称') "`
  15. TargetAttrId int64 `json:"targetAttrId" xorm:"'target_attr_id' bigint comment('Target AttrId') "`
  16. TargetAttrTitle string `json:"targetAttrTitle" xorm:"'target_attr_title' varchar(127) comment('Target AttrTitle')"`
  17. TargetAttrCode string `json:"targetAttrCode" xorm:"'target_attr_code' varchar(127) comment('Target AttrCode') "`
  18. RuleCode string `json:"ruleCode" xorm:"'rule_code' varchar(127) comment('Rule Code') "`
  19. SortNo int64 `json:"sortNo" xorm:"'sort_no' bigint comment('Sort No') "`
  20. }
  21. func (t *BizObjectOAMRuleInfo) TableName() string {
  22. return "biz_object_oam_rule"
  23. }
  24. func (t *BizObjectOAMRuleInfo) MarshalBinary() (data []byte, err error){
  25. return json.Marshal(t)
  26. }
  27. func (t *BizObjectOAMRuleInfo) UnmarshalBinary(data []byte) (err error){
  28. return json.Unmarshal(data, t)
  29. }