package model

import "time"

type AdminUser struct {
	ID            uint64     `gorm:"primaryKey" json:"id"`
	Username      string     `gorm:"size:64;not null;uniqueIndex" json:"username"`
	PasswordHash  string     `gorm:"size:255;not null" json:"-"`
	Nickname      string     `gorm:"size:64;not null;default:''" json:"nickname"`
	Status        string     `gorm:"size:32;not null;default:'active'" json:"status"`
	SupportStatus string     `gorm:"size:16;not null;default:'offline';index" json:"support_status"`
	LastLoginAt   *time.Time `json:"last_login_at"`
	CreatedAt     time.Time  `json:"created_at"`
	UpdatedAt     time.Time  `json:"updated_at"`
}

func (AdminUser) TableName() string {
	return "admin_users"
}
