sunpengfei
2025-08-01 9fd157a63dfbb8ee9f32fff7540c97eb4a3d3cce
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
using Furion.DatabaseAccessor;
using Furion.DataEncryption;
using Furion.DistributedIDGenerator;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace FlexJobApi.Core
{
    /// <summary>
    /// 用户
    /// </summary>
    public class UserAuth : CommonEntity, IEntitySeedData<UserAuth>
    {
        public UserAuth()
        {
            UserInfos = [];
        }
 
        /// <summary>
        /// 头像Id
        /// </summary>
        public Guid? AvatarId { get; set; }
 
        /// <summary>
        /// 头像
        /// </summary>
        public FileVirtualPath Avatar { get; set; }
 
        /// <summary>
        /// 姓名
        /// </summary>
        [Required]
        [MaxLength(32)]
        public string Name { get; set; }
 
        /// <summary>
        /// 用户名
        /// </summary>
        [Required]
        [MaxLength(32)]
        public string UserName { get; set; }
 
        /// <summary>
        /// 手机号
        /// </summary>
        [MaxLength(11)]
        public string PhoneNumber { get; set; }
 
        /// <summary>
        /// 是否已校验手机号
        /// </summary>
        public bool IsCheckPhoneNumber { get; set; }
 
        /// <summary>
        /// 密码
        /// </summary>
        public string Password { get; set; }
 
        /// <summary>
        /// 身份证号
        /// </summary>
        public string Identity { get; set; }
 
        /// <summary>
        /// 身份证人像面Id
        /// </summary>
        public Guid? IdentityImgId { get; set; }
 
        /// <summary>
        /// 身份证人像面
        /// </summary>
        public FileVirtualPath IdentityImg { get; set; }
 
        /// <summary>
        /// 身份证国徽面Id
        /// </summary>
        public Guid? IdentityBackImgId { get; set; }
 
        /// <summary>
        /// 身份证国徽面
        /// </summary>
        public FileVirtualPath IdentityBackImg { get; set; }
 
        /// <summary>
        /// 银行卡号
        /// </summary>
        [MaxLength(32)]
        public string BankCard { get; set; }
 
        /// <summary>
        /// 银行卡照片Id
        /// </summary>
        public Guid? BankCardImgId { get; set; }
 
        /// <summary>
        /// 银行卡照片
        /// </summary>
        public FileVirtualPath BankCardImg { get; set; }
 
        /// <summary>
        /// 实名通道
        /// </summary>
        public EnumRealAccess? RealAccess { get; set; }
 
        /// <summary>
        /// 是否实名
        /// </summary>
        public bool IsReal { get; set; }
 
        /// <summary>
        /// 用户信息
        /// </summary>
        public List<UserInfo> UserInfos { get; set; }
 
        public IEnumerable<UserAuth> HasData(DbContext dbContext, Type dbContextLocator)
        {
            return new List<UserAuth>
            {
                new UserAuth
                {
                    Id = new Guid("11111111-1111-1111-1111-111111111111"),
                    Name = "管理员",
                    UserName = "admin",
                    CreatedTime = new DateTime(2000, 1, 1)
                }
            };
        }
    }
}