// 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"
)

const TableNameUser = "user"

// User mapped from table <user>
type User struct {
	ID            int64      `gorm:"column:id;type:bigint;primaryKey;comment:用户ID" json:"id"`         // 用户ID
	NickName      string     `gorm:"column:nick_name;type:varchar(50);comment:用户昵称" json:"nick_name"` // 用户昵称
	RealName      string     `gorm:"column:real_name;type:varchar(50);not null" json:"real_name"`
	AvatarURL     string     `gorm:"column:avatar_url;type:varchar(200);not null;comment:头像URL" json:"avatar_url"`                     // 头像URL
	Email         string     `gorm:"column:email;type:varchar(50);not null;index:user_idx_email,priority:1;comment:邮箱地址" json:"email"` // 邮箱地址
	Password      string     `gorm:"column:password;type:varchar(500);not null;comment:密码" json:"password"`                            // 密码
	Country       string     `gorm:"column:country;type:varchar(100);not null" json:"country"`
	Company       string     `gorm:"column:company;type:varchar(100);not null" json:"company"`
	Address       string     `gorm:"column:address;type:varchar(200);not null" json:"address"`
	State         string     `gorm:"column:state;type:varchar(200);not null" json:"state"`
	City          string     `gorm:"column:city;type:varchar(200);not null" json:"city"`
	ZipCode       string     `gorm:"column:zip_code;type:varchar(100);not null" json:"zip_code"`
	About         string     `gorm:"column:about;type:varchar(200)" json:"about"`
	PhoneNumber   string     `gorm:"column:phone_number;type:varchar(50);not null;index:user_idx_phone,priority:2;comment:手机号" json:"phone_number"`         // 手机号
	PhoneAreaCode string     `gorm:"column:phone_area_code;type:varchar(50);not null;index:user_idx_phone,priority:1;comment:手机区域号" json:"phone_area_code"` // 手机区域号
	Roles         string     `gorm:"column:roles;type:varchar(100);not null" json:"roles"`
	Status        string     `gorm:"column:status;type:varchar(100);not null" json:"status"`
	CreatedAt     *time.Time `gorm:"column:created_at;type:datetime;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
	UpdatedAt     *time.Time `gorm:"column:updated_at;type:datetime;not null;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
}

// TableName User's table name
func (*User) TableName() string {
	return TableNameUser
}
