123456789101112131415161718192021222324252627282930313233343536 |
- package model
- import (
- "time"
- "gorm.io/gorm"
- )
- const TableNameToken = "token"
- type Token struct {
- ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
- CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:Create Time | 创建日期" json:"created_at"`
- UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:Update Time | 修改日期" json:"updated_at"`
- DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Delete Time | 删除时间" json:"deleted_at"`
- ExpireAt time.Time `gorm:"column:expire_at;comment:过期时间" json:"expire_at"`
- Token string `gorm:"column:token;comment:Token" json:"token"`
- Mac string `gorm:"column:mac;comment:Mac地址" json:"mac"`
- Remark string `gorm:"column:remark;comment:备注" json:"remark"`
- OrganizationID int64 `gorm:"column:organization_id;comment:租户ID" json:"organization_id"`
- AgentID int64 `gorm:"column:agent_id;comment:0 定制" json:"agent_id"`
- CustomAgentBase string `gorm:"column:custom_agent_base;comment:定制agent服务地址" json:"custom_agent_base"`
- CustomAgentKey string `gorm:"column:custom_agent_key;comment:定制agent服务密钥" json:"custom_agent_key"`
- OpenaiBase string `gorm:"column:openai_base;comment:大模型服务地址" json:"openai_base"`
- OpenaiKey string `gorm:"column:openai_key;comment:大模型服务密钥" json:"openai_key"`
- }
- func (*Token) TableName() string {
- return TableNameToken
- }
|