ot_biz_stats_hourly.gen.go 3.3 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. )
  8. const TableNameBizStatsHourly = "ot_biz_stats_hourly"
  9. // BizStatsHourly mapped from table <ot_biz_stats_hourly>
  10. type BizStatsHourly struct {
  11. ID int64 `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true;comment:主键id" json:"id"` // 主键id
  12. AppAlias string `gorm:"column:app_alias;type:varchar(50);not null;index:app_alias,priority:1;comment:应用别名" json:"app_alias"` // 应用别名
  13. BizHash string `gorm:"column:biz_hash;type:varchar(100);not null;uniqueIndex:biz_hash_2,priority:1;index:biz_hash,priority:1;comment:业务hash" json:"biz_hash"` // 业务hash
  14. StartTime time.Time `gorm:"column:start_time;type:datetime;not null;uniqueIndex:biz_hash_2,priority:2;index:start_time,priority:1;comment:统计开始时间" json:"start_time"` // 统计开始时间
  15. EndTime time.Time `gorm:"column:end_time;type:datetime;not null;uniqueIndex:biz_hash_2,priority:3;index:end_time,priority:1;comment:统计结束时间" json:"end_time"` // 统计结束时间
  16. VisitNum int32 `gorm:"column:visit_num;type:int(11);not null;comment:访问量" json:"visit_num"` // 访问量
  17. ErrorNum int32 `gorm:"column:error_num;type:int(11);not null;comment:错误量" json:"error_num"` // 错误量
  18. ErrorRate float64 `gorm:"column:error_rate;type:double;not null;comment:错误率" json:"error_rate"` // 错误率
  19. DurationAverage float64 `gorm:"column:duration_average;type:double;not null;comment:平均延迟" json:"duration_average"` // 平均延迟
  20. DurationMedian float64 `gorm:"column:duration_median;type:double;not null;comment:中位延迟" json:"duration_median"` // 中位延迟
  21. DurationP90 float64 `gorm:"column:duration_p90;type:double;not null;comment:90分位延迟" json:"duration_p90"` // 90分位延迟
  22. DurationP99 float64 `gorm:"column:duration_p99;type:double;not null;comment:99分位延迟" json:"duration_p99"` // 99分位延迟
  23. DurationMax float64 `gorm:"column:duration_max;type:double;not null;comment:最大延迟" json:"duration_max"` // 最大延迟
  24. CreatedAt time.Time `gorm:"column:created_at;type:datetime;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
  25. UpdatedAt time.Time `gorm:"column:updated_at;type:datetime;comment:更新时间" json:"updated_at"` // 更新时间
  26. }
  27. // TableName BizStatsHourly's table name
  28. func (*BizStatsHourly) TableName() string {
  29. return TableNameBizStatsHourly
  30. }