lingling
2025-03-17 132fe999967557c6c2a640ee52fa22dca5c89111
修改地区
2个文件已修改
1个文件已添加
72 ■■■■■ 已修改文件
LifePayment/LifePayment.EntityFrameworkCore/LifePayment.EntityFrameworkCore.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.EntityFrameworkCore/ModelConfigure/ModelDbContextModelBuilderExtensions.cs 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.HttpApi/LifePay/AccountController.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LifePayment/LifePayment.EntityFrameworkCore/LifePayment.EntityFrameworkCore.csproj
@@ -22,7 +22,6 @@
  </ItemGroup>
  <ItemGroup>
    <Folder Include="ModelConfigure\" />
    <Folder Include="Setting\" />
  </ItemGroup>
LifePayment/LifePayment.EntityFrameworkCore/ModelConfigure/ModelDbContextModelBuilderExtensions.cs
New file
@@ -0,0 +1,70 @@
using LifePayment.Domain.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LifePayment.EntityFrameworkCore
{
    public static class ModelDbContextModelBuilderExtensions
    {
        public static void ConfigureModels([NotNull] this ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Area>(entity =>
            {
                entity.ToTable("BaseArea");
                entity.Property(e => e.Id).ValueGeneratedNever();
                entity.HasComment("行政区域表");
                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasComment("区域主键");
                entity.Property(e => e.AreaCode).HasComment("区域编码");
                entity.Property(e => e.AreaName)
                    .HasMaxLength(50)
                    .IsUnicode(false)
                    .HasComment("区域名称");
                entity.Property(e => e.ConcurrencyStamp).HasMaxLength(40);
                entity.Property(e => e.CreationTime)
                    .HasColumnType("datetime")
                    .HasDefaultValueSql("(getdate())");
                entity.Property(e => e.Description)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("备注");
                entity.Property(e => e.IsEnable)
                    .IsRequired()
                    .HasDefaultValueSql("((1))");
                entity.Property(e => e.LastModificationTime).HasColumnType("datetime");
                entity.Property(e => e.Layer).HasComment("层次");
                entity.Property(e => e.ParentId).HasComment("父级主键");
                entity.Property(e => e.QuickQuery)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("快速查询");
                entity.Property(e => e.SimpleSpelling)
                    .HasMaxLength(200)
                    .IsUnicode(false)
                    .HasComment("简拼");
                entity.Property(e => e.SortCode).HasComment("排序码");
            });
        }
    }
}
LifePayment/LifePayment.HttpApi/LifePay/AccountController.cs
@@ -21,6 +21,7 @@
        private readonly IWebClientInfoProvider _webClientInfoProvider;
        public AccountController(
               IAccountService accountService,
               IOptionsMonitor<OssSettings> optionsMonitor,