123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- using FreeSql.DataAnnotations;
- using System;
- using System.Collections.Generic;
- using ZhonTai.Admin.Core.Entities;
- using ZhonTai.Admin.Domain.Tenant;
- using ZhonTai.Admin.Domain.Role;
- using ZhonTai.Admin.Domain.UserRole;
- using ZhonTai.Admin.Domain.Staff;
- using ZhonTai.Admin.Domain.Org;
- namespace ZhonTai.Admin.Domain.User;
- [Table(Name = "ad_user")]
- [Index("idx_{tablename}_01", nameof(UserName) + "," + nameof(TenantId), true)]
- public partial class UserEntity : EntityFull, ITenant
- {
-
-
-
- [Column(Position = 2)]
- public long? TenantId { get; set; }
- public TenantEntity Tenant { get; set; }
-
-
-
- [Column(StringLength = 60)]
- public string UserName { get; set; }
-
-
-
- [Column(StringLength = 60)]
- public string Password { get; set; }
-
-
-
- [Column(StringLength = 20)]
- public string Name { get; set; }
-
-
-
- [Column(StringLength = 20)]
- public string Mobile { get; set; }
-
-
-
- [Column(StringLength = 100)]
- public string Email { get; set; }
-
-
-
- public long MainOrgId { get; set; }
- public OrgEntity MainOrg { get; set; }
-
-
-
- public long? ManagerUserId { get; set; }
- public UserEntity ManagerUser { get; set; }
-
-
-
- [Column(StringLength = 20)]
- public string NickName { get; set; }
-
-
-
- [Column(StringLength = 100)]
- public string Avatar { get; set; }
-
-
-
- [Column(MapType = typeof(int))]
- public UserStatusEnum Status { get; set; }
-
-
-
- [Column(MapType = typeof(int))]
- public UserTypeEnum Type { get; set; } = UserTypeEnum.User;
-
-
-
- [Navigate(ManyToMany = typeof(UserRoleEntity))]
- public ICollection<RoleEntity> Roles { get; set; }
- [Navigate(ManyToMany = typeof(UserOrgEntity))]
- public ICollection<OrgEntity> Orgs { get; set; }
-
-
-
- [Navigate(nameof(Id))]
- public StaffEntity Staff { get; set; }
- }
|