Bot token aka. API token

This commit is contained in:
2024-08-24 20:28:10 +08:00
parent 516f5593de
commit 8f61253bd3
12 changed files with 248 additions and 55 deletions

View File

@ -46,8 +46,6 @@ type AuthTicket struct {
Account Account `json:"account"`
AccountID uint `json:"account_id"`
IsApiKey bool `json:"is_api_key"`
}
func (v AuthTicket) IsAvailable() error {

View File

@ -0,0 +1,11 @@
package models
type ApiKey struct {
BaseModel
Name string `json:"name"`
Description string `json:"description"`
Lifecycle *int64 `json:"lifecycle"`
Ticket AuthTicket `json:"ticket" gorm:"TicketID"`
TicketID uint `json:"ticket_id"`
}