cache.gen.go 819 B

12345678910111213141516171819202122232425
  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 model
  5. import (
  6. "time"
  7. )
  8. const TableNameCache = "cache"
  9. // Cache mapped from table <cache>
  10. type Cache struct {
  11. ID int64 `gorm:"column:id;type:bigint(20);primaryKey;autoIncrement:true" json:"id"`
  12. Key string `gorm:"column:key;type:varchar(255);not null;uniqueIndex:key,priority:1" json:"key"`
  13. Value string `gorm:"column:value;type:json" json:"value"`
  14. ExpiAt int64 `gorm:"column:expi_at;type:bigint(20)" json:"expi_at"` // 过期时间
  15. CreatedAt time.Time `gorm:"column:created_at;type:datetime" json:"created_at"` // 创建时间
  16. }
  17. // TableName Cache's table name
  18. func (*Cache) TableName() string {
  19. return TableNameCache
  20. }