sunpengfei
2025-08-04 b9b4c926a7898d8b7d657e75ec83064390a5f9fb
FlexJobApi.Core/Entities/Common/DictionaryData.cs
@@ -17,7 +17,7 @@
    {
        public DictionaryData()
        {
            Childrens = [];
            Children = [];
        }
        /// <summary>
@@ -43,7 +43,12 @@
        /// <summary>
        /// 下级
        /// </summary>
        public List<DictionaryData> Childrens { get; set; }
        public List<DictionaryData> Children { get; set; }
        /// <summary>
        /// 字典路径
        /// </summary>
        public string Path { get; set; }
        /// <summary>
        /// 编号
@@ -85,7 +90,7 @@
        public void Configure(EntityTypeBuilder<DictionaryData> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
            entityBuilder
                .HasMany(x => x.Childrens)
                .HasMany(x => x.Children)
                .WithOne(x => x.Parent)
                .HasForeignKey(x => x.ParentId)
                .OnDelete(DeleteBehavior.ClientSetNull);