ot_biz.gen.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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 TableNameBiz = "ot_biz"
  10. // Biz mapped from table <ot_biz>
  11. type Biz struct {
  12. ID int64 `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true" json:"id"`
  13. CreatedAt time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"`
  14. UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"`
  15. Name string `gorm:"column:name;type:varchar(255);not null" json:"name"`
  16. Hash string `gorm:"column:hash;type:varchar(100);not null;uniqueIndex:hash,priority:1;uniqueIndex:ot_biz_pk2,priority:1;comment:业务唯一哈希值, 通过app_alias, service_name, span_name计算得出, 防止数据重建后metrics统计失效" json:"hash"` // 业务唯一哈希值, 通过app_alias, service_name, span_name计算得出, 防止数据重建后metrics统计失效
  17. AppID int64 `gorm:"column:app_id;type:bigint(20);not null" json:"app_id"`
  18. AppAlias string `gorm:"column:app_alias;type:varchar(30);not null;uniqueIndex:ot_biz_pk,priority:1;comment:业务别名" json:"app_alias"` // 业务别名
  19. ServiceName string `gorm:"column:service_name;type:varchar(50);not null;uniqueIndex:ot_biz_pk,priority:2" json:"service_name"`
  20. SpanName string `gorm:"column:span_name;type:varchar(255);not null;uniqueIndex:ot_biz_pk,priority:3" json:"span_name"`
  21. IsAutoCreated int64 `gorm:"column:is_auto_created;type:bigint(20);not null" json:"is_auto_created"`
  22. SpanKind string `gorm:"column:span_kind;type:varchar(20);not null;comment:span类型" json:"span_kind"` // span类型
  23. Favor int32 `gorm:"column:favor;type:tinyint(4);not null;comment:收藏 0未收藏 1已收藏" json:"favor"` // 收藏 0未收藏 1已收藏
  24. DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);index:idx_ot_biz_deleted_at,priority:1" json:"deleted_at"`
  25. }
  26. // TableName Biz's table name
  27. func (*Biz) TableName() string {
  28. return TableNameBiz
  29. }