

using LinqToDB.Mapping;

namespace MasaBlazorApp3.Pojo
{
    [Table("user_list")]
    public class User
    {
        [Column("id")]
        [PrimaryKey, Identity]
        public int Id { get; set; }
        [Column("user_id")]
        public string Username { get; set; }

        [Column("pass_word")]
        public string Password { get; set; }


        [Column("user_name")]
        public string NickName { get; set; }


        [Column("machine_id")]
        public string MachineId { get; set; }


        [Column("sign")]
        public byte[] Sign { get; set; }


        [Column("machine_role_id")]
        public int RoleId { get; set; }


        [Association(ThisKey = nameof(RoleId), OtherKey = nameof(Role.Id))]
        public Role role { get; set; }

        [Column(IsColumn =false)]
        public string OldPassword { get; set; }
    }
}
