From 132fe999967557c6c2a640ee52fa22dca5c89111 Mon Sep 17 00:00:00 2001
From: lingling <kety1122@163.com>
Date: 星期一, 17 三月 2025 13:15:49 +0800
Subject: [PATCH] 修改地区
---
LifePayment/LifePayment.EntityFrameworkCore/LifePayment.EntityFrameworkCore.csproj | 1
LifePayment/LifePayment.EntityFrameworkCore/ModelConfigure/ModelDbContextModelBuilderExtensions.cs | 70 +++++++++++++++++++++++++++++++++++
LifePayment/LifePayment.HttpApi/LifePay/AccountController.cs | 1
3 files changed, 71 insertions(+), 1 deletions(-)
diff --git a/LifePayment/LifePayment.EntityFrameworkCore/LifePayment.EntityFrameworkCore.csproj b/LifePayment/LifePayment.EntityFrameworkCore/LifePayment.EntityFrameworkCore.csproj
index 74fdf56..2e46b3a 100644
--- a/LifePayment/LifePayment.EntityFrameworkCore/LifePayment.EntityFrameworkCore.csproj
+++ b/LifePayment/LifePayment.EntityFrameworkCore/LifePayment.EntityFrameworkCore.csproj
@@ -22,7 +22,6 @@
</ItemGroup>
<ItemGroup>
- <Folder Include="ModelConfigure\" />
<Folder Include="Setting\" />
</ItemGroup>
diff --git a/LifePayment/LifePayment.EntityFrameworkCore/ModelConfigure/ModelDbContextModelBuilderExtensions.cs b/LifePayment/LifePayment.EntityFrameworkCore/ModelConfigure/ModelDbContextModelBuilderExtensions.cs
new file mode 100644
index 0000000..6ddda76
--- /dev/null
+++ b/LifePayment/LifePayment.EntityFrameworkCore/ModelConfigure/ModelDbContextModelBuilderExtensions.cs
@@ -0,0 +1,70 @@
+锘縰sing 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("鎺掑簭鐮�");
+ });
+ }
+ }
+}
diff --git a/LifePayment/LifePayment.HttpApi/LifePay/AccountController.cs b/LifePayment/LifePayment.HttpApi/LifePay/AccountController.cs
index 3f95827..804b358 100644
--- a/LifePayment/LifePayment.HttpApi/LifePay/AccountController.cs
+++ b/LifePayment/LifePayment.HttpApi/LifePay/AccountController.cs
@@ -21,6 +21,7 @@
private readonly IWebClientInfoProvider _webClientInfoProvider;
+
public AccountController(
IAccountService accountService,
IOptionsMonitor<OssSettings> optionsMonitor,
--
Gitblit v1.9.1