ot_service_edges.gen.go 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package models
  5. import (
  6. "time"
  7. "gorm.io/gorm"
  8. )
  9. const TableNameServiceEdge = "ot_service_edges"
  10. // ServiceEdge mapped from table <ot_service_edges>
  11. type ServiceEdge struct {
  12. ID int32 `gorm:"column:id;type:int(11);primaryKey;autoIncrement:true;comment:主键id" json:"id"` // 主键id
  13. AppAlias string `gorm:"column:app_alias;type:varchar(30);not null;comment:所属应用别名(废弃)" json:"app_alias"` // 所属应用别名(废弃)
  14. Source string `gorm:"column:source;type:varchar(50);not null;uniqueIndex:uniqkey,priority:1;comment:源结点标识, 通常为服务名, 应用别名, 中间件, 数据库等" json:"source"` // 源结点标识, 通常为服务名, 应用别名, 中间件, 数据库等
  15. Target string `gorm:"column:target;type:varchar(50);not null;uniqueIndex:uniqkey,priority:2;comment:目标结点, 通常为服务名, 应用别名, 中间件, 数据库等" json:"target"` // 目标结点, 通常为服务名, 应用别名, 中间件, 数据库等
  16. SourceIcon string `gorm:"column:source_icon;type:varchar(30);not null;comment:源结点 icon" json:"source_icon"` // 源结点 icon
  17. TargetIcon string `gorm:"column:target_icon;type:varchar(30);not null;comment:目标结点 icon" json:"target_icon"` // 目标结点 icon
  18. SourceType string `gorm:"column:source_type;type:varchar(30);not null;uniqueIndex:uniqkey,priority:3;default:service;comment:源节点类型" json:"source_type"` // 源节点类型
  19. TargetType string `gorm:"column:target_type;type:varchar(30);not null;uniqueIndex:uniqkey,priority:4;default:service;comment:目标节点类型" json:"target_type"` // 目标节点类型
  20. SourceService string `gorm:"column:source_service;type:varchar(50);not null;uniqueIndex:uniqkey,priority:5;comment:源服务" json:"source_service"` // 源服务
  21. TargetService string `gorm:"column:target_service;type:varchar(50);not null;uniqueIndex:uniqkey,priority:6;comment:目标服务" json:"target_service"` // 目标服务
  22. SourceApp string `gorm:"column:source_app;type:varchar(50);not null;uniqueIndex:uniqkey,priority:7;comment:源应用" json:"source_app"` // 源应用
  23. TargetApp string `gorm:"column:target_app;type:varchar(50);not null;uniqueIndex:uniqkey,priority:8;comment:目标应用" json:"target_app"` // 目标应用
  24. CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
  25. UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;comment:更新时间" json:"updated_at"` // 更新时间
  26. DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime;comment:删除时间" json:"deleted_at"` // 删除时间
  27. }
  28. // TableName ServiceEdge's table name
  29. func (*ServiceEdge) TableName() string {
  30. return TableNameServiceEdge
  31. }