// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
#nullable disable
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using PVDEMCS.Services.Repositories.Entities.BaseEntity;

namespace PVDEMCS.Services.Repositories.Entities;

/// <summary>
/// 用户信息表
/// </summary>
[Table("sys_user")]
[MySqlCollation("utf8mb4_bin")]
public partial class SysUserEntity : CUDBaseEntity
{

    /// <summary>
    /// 用户账号
    /// </summary>
    [Required]
    [Column("user_name")]
    [StringLength(30)]
    public string UserName { get; set; }

    /// <summary>
    /// 用户昵称
    /// </summary>
    [Required]
    [Column("nick_name")]
    [StringLength(30)]
    public string NickName { get; set; }

    /// <summary>
    /// 用户类型（admin系统用户,normal普通用户）
    /// </summary>
    [Column("user_type")]
    [StringLength(2)]
    public string UserType { get; set; }

    /// <summary>
    /// 用户邮箱
    /// </summary>
    [Column("email")]
    [StringLength(50)]
    public string Email { get; set; }

    /// <summary>
    /// 手机号码
    /// </summary>
    [Column("phonenumber")]
    [StringLength(11)]
    public string Phonenumber { get; set; }

    /// <summary>
    /// 用户性别（0男 1女 2未知）
    /// </summary>
    [Column("sex")]
    [StringLength(1)]
    public string Sex { get; set; }

    /// <summary>
    /// 头像地址
    /// </summary>
    [Column("avatar")]
    [StringLength(100)]
    public string Avatar { get; set; }

    /// <summary>
    /// 密码
    /// </summary>
    [Column("password")]
    [StringLength(100)]
    public string Password { get; set; }

    /// <summary>
    /// 帐号状态（1：启用，0：停用）
    /// </summary>
    [Column("activated")]
    [StringLength(1)]
    public bool Activated { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    [Column("remark")]
    [StringLength(500)]
    public string Remark { get; set; }

    /// <summary>
    /// 最后登录IP
    /// </summary>
    [Column("login_ip")]
    [StringLength(128)]
    public string LoginIp { get; set; }

    /// <summary>
    /// 最后登录时间
    /// </summary>
    [Column("login_date", TypeName = "datetime")]
    public DateTime? LoginDate { get; set; }
}