// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.

package model

import (
	"time"

	"gorm.io/gorm"
)

const TableNameAdminUser = "admin_users"

// AdminUser mapped from table <admin_users>
type AdminUser struct {
	ID             int64          `gorm:"column:id;type:bigint(20) unsigned;primaryKey;autoIncrement:true" json:"id"`
	RoleID         int32          `gorm:"column:role_id;type:int(11)" json:"role_id"`
	UserName       string         `gorm:"column:user_name;type:varchar(255)" json:"user_name"`             // 用户名
	PasswordDigest string         `gorm:"column:password_digest;type:varchar(255)" json:"password_digest"` // 密码
	Nickname       string         `gorm:"column:nickname;type:varchar(128)" json:"nickname"`               // 昵称
	Avatar         string         `gorm:"column:avatar;type:varchar(255)" json:"avatar"`
	Status         int32          `gorm:"column:status;type:int(11);default:1" json:"status"`                                         // 状态
	CreatedAt      time.Time      `gorm:"column:created_at;type:datetime(3)" json:"created_at"`                                       // 创建时间
	UpdatedAt      time.Time      `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"`                                       // 更新时间
	DeletedAt      gorm.DeletedAt `gorm:"column:deleted_at;type:datetime(3);index:idx_users_deleted_at,priority:1" json:"deleted_at"` // 删除时间
}

// TableName AdminUser's table name
func (*AdminUser) TableName() string {
	return TableNameAdminUser
}
