123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- using Furion.DatabaseAccessor;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Metadata.Builders;
- using System;
- using System.ComponentModel.DataAnnotations;
- namespace YBEE.EQM.Core;
- /// <summary>
- /// 用户
- /// </summary>
- [Comment("用户")]
- public partial class SysUser : DEntityBase, IEntityTypeBuilder<SysUser>
- {
- /// <summary>
- /// 机构ID
- /// </summary>
- [Comment("机构ID")]
- [Required]
- public short SysOrgId { get; set; }
- /// <summary>
- /// 名称
- /// </summary>
- [Comment("名称")]
- [Required, StringLength(200)]
- public string Name { get; set; }
- /// <summary>
- /// 头像地址
- /// </summary>
- [Comment("头像地址")]
- [StringLength(500)]
- public string Avatar { get; set; }
- /// <summary>
- /// 手机
- /// </summary>
- [Comment("手机")]
- [StringLength(16)]
- public string Mobile { get; set; }
- /// <summary>
- /// 电子邮箱
- /// </summary>
- [Comment("电子邮箱")]
- [StringLength(200)]
- public string Email { get; set; }
- /// <summary>
- /// 工号
- /// </summary>
- [Comment("工号")]
- [StringLength(200)]
- public string JobNumber { get; set; }
- /// <summary>
- /// 备注
- /// </summary>
- [Comment("备注")]
- [StringLength(200)]
- public string Remark { get; set; }
- /// <summary>
- /// 登录名
- /// </summary>
- [Comment("登录名")]
- [Required, StringLength(50)]
- public string Account { get; set; }
- /// <summary>
- /// 密码
- /// </summary>
- [Comment("密码")]
- [Required, StringLength(100)]
- public string Password { get; set; }
- /// <summary>
- /// 是否已激活
- /// </summary>
- [Comment("是否已激活")]
- [Required]
- public bool IsActivated { get; set; } = false;
- /// <summary>
- /// 激活时间
- /// </summary>
- [Comment("激活时间")]
- public DateTime? ActivateTime { get; set; }
- /// <summary>
- /// 最后登录IP
- /// </summary>
- [Comment("最后登录IP")]
- [MaxLength(21)]
- public string LastLoginIp { get; set; }
- /// <summary>
- /// 最后登录时间
- /// </summary>
- [Comment("最后登录时间")]
- public DateTime? LastLoginTime { get; set; }
- /// <summary>
- /// 用户自定义配置
- /// </summary>
- [Comment("用户自定义配置")]
- public string Config { get; set; }
- /// <summary>
- /// 状态
- /// </summary>
- [Comment("状态")]
- [Required]
- public CommonStatus Status { get; set; }
- /// <summary>
- /// 一对一引用(机构)
- /// </summary>
- public virtual SysOrg SysOrg { get; set; }
- public void Configure(EntityTypeBuilder<SysUser> entityBuilder, DbContext dbContext, Type dbContextLocator)
- {
- entityBuilder.Ignore(t => t.CreateSysUser).Ignore(t => t.UpdateSysUser);
- }
- }
|