package models import "time" type ApiToken struct { ID uint `json:"id" gorm:"primaryKey;autoIncrement"` Name string `json:"name" gorm:"type:varchar(255);not null"` Token string `json:"-" gorm:"type:varchar(512);uniqueIndex:ix_api_tokens_token;not null"` Permissions string `json:"permissions" gorm:"type:text;not null"` IsActive bool `json:"is_active" gorm:"not null"` CreatedAt time.Time `json:"created_at" gorm:"not null;autoCreateTime"` ExpiresAt *time.Time `json:"expires_at"` LastUsedAt *time.Time `json:"last_used_at"` }