sunpengfei
2025-08-08 c8b6903d85e7ceef504a198b4bdfc6b72a73fe19
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
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace FlexJobApi.Core
{
    /// <summary>
    /// 用户简历
    /// </summary>
    public class UserResume : CommonEntity, IEntityTypeBuilder<UserResume>
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        public Guid UserId { get; set; }
 
        /// <summary>
        /// 用户
        /// </summary>
        public User User { get; set; }
 
        /// <summary>
        /// 身份编号
        /// </summary>
        public string PersonalIdentityCode { get; set; }
 
        /// <summary>
        /// 身份
        /// </summary>
        public DictionaryData PersonalIdentity { get; set; }
 
        /// <summary>
        /// 学历编号
        /// </summary>
        public string EducationalBackgroundCode { get; set; }
 
        /// <summary>
        /// 学历
        /// </summary>
        public DictionaryData EducationalBackground { get; set; }
 
        /// <summary>
        /// 空闲时间
        /// </summary>
        public EnumPersonalFreeTime? FreeTime { get; set; }
 
        /// <summary>
        /// 求职状态
        /// </summary>
        public EnumPersonalJobSeekingStatus? JobSeekingStatus { get; set; }
 
        /// <summary>
        /// 工作资历
        /// </summary>
        public string WorkSeniority { get; set; }
 
        /// <summary>
        /// 工作经验
        /// </summary>
        public string WorkExperience { get; set; }
 
        /// <summary>
        /// 身高
        /// </summary>
        public int? Height { get; set; }
 
        /// <summary>
        /// 体重
        /// </summary>
        public int? Weight { get; set; }
 
        public void Configure(EntityTypeBuilder<UserResume> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            entityBuilder
                .HasOne(it => it.PersonalIdentity)
                .WithMany()
                .HasForeignKey(it => it.PersonalIdentityCode)
                .HasPrincipalKey(it => it.Code)
                .OnDelete(DeleteBehavior.Restrict);
            entityBuilder
                .HasOne(it => it.EducationalBackground)
                .WithMany()
                .HasForeignKey(it => it.EducationalBackgroundCode)
                .HasPrincipalKey(it => it.Code)
                .OnDelete(DeleteBehavior.Restrict);
        }
    }
}