jwtx_tokens.gen.go 2.0 KB

1234567891011121314151617181920212223242526272829
  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 TableNameJwtxToken = "jwtx_tokens"
  9. // JwtxToken jwtx token 信息表
  10. type JwtxToken struct {
  11. ID uint64 `gorm:"column:id;type:bigint unsigned;primaryKey;autoIncrement:true;comment:token ID" json:"id"` // token ID
  12. AccountID uint64 `gorm:"column:account_id;type:bigint unsigned;not null;index:account_id,priority:1;comment:账户 ID" json:"account_id"` // 账户 ID
  13. LoginGroup string `gorm:"column:login_group;type:varchar(255);not null;index:login_group,priority:1;comment:登录的分组" json:"login_group"` // 登录的分组
  14. LoginTerminal string `gorm:"column:login_terminal;type:varchar(255);not null;index:login_terminal,priority:1;comment:登录的终端" json:"login_terminal"` // 登录的终端
  15. MakeTokenIP string `gorm:"column:make_token_ip;type:varchar(50);not null;comment:首次请求生成 token 的 IP 地址" json:"make_token_ip"` // 首次请求生成 token 的 IP 地址
  16. CreatedAt time.Time `gorm:"column:created_at;type:datetime;not null;comment:创建时间" json:"created_at"` // 创建时间
  17. LastRefreshAt time.Time `gorm:"column:last_refresh_at;type:datetime;not null;comment:上次的刷新时间" json:"last_refresh_at"` // 上次的刷新时间
  18. FinalRefreshAt time.Time `gorm:"column:final_refresh_at;type:datetime;not null;comment:最后的刷新时间" json:"final_refresh_at"` // 最后的刷新时间
  19. ExpirationAt time.Time `gorm:"column:expiration_at;type:datetime;not null;comment:过期时间" json:"expiration_at"` // 过期时间
  20. }
  21. // TableName JwtxToken's table name
  22. func (*JwtxToken) TableName() string {
  23. return TableNameJwtxToken
  24. }