Merge branch 'master' of ssh://home.bobandjuly.cyou:5122/ewide/ewide_core

This commit is contained in:
2021-04-25 17:05:04 +08:00
3 changed files with 60 additions and 5 deletions

View File

@@ -0,0 +1,44 @@
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ewide.Core.Entity
{
[Table("ewide_area_number")]
[Comment("区域表")]
public class AreaNumber: IEntity
{
[Key]
[Comment("系统使用的区域代码")]
[MaxLength(10)]
public string Code { get; set; }
[Comment("对外使用的区域代码")]
[MaxLength(10)]
public string ShowCode { get; set; }
[Comment("名称")]
[Required]
[MaxLength(10)]
public string Name { get; set; }
[Comment("备注")]
public string Note { get; set; }
[Comment("类别")]
[Required]
public int LevelType { get; set; }
[Comment("父级区域代码")]
[MaxLength(10)]
public string ParentCode { get; set; }
[Comment("排序")]
public int Sort { get; set; }
}
}

View File

@@ -5,9 +5,20 @@
</PropertyGroup>
<ItemGroup>
<None Remove="dbsettings.Development.json" />
<None Remove="dbsettings.json" />
<None Remove="sqlsettings.json" />
</ItemGroup>
<ItemGroup>
<Content Include="dbsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dbsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.5" />
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="5.0.0-alpha.2" />
@@ -17,10 +28,5 @@
<ProjectReference Include="..\Ewide.Core\Ewide.Core.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="dbsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,5 @@
{
"ConnectionStrings": {
"DefaultConnection": "Data Source=localhost;Port=3307;Database=Ewide;User ID=root;Password=root;pooling=true;sslmode=none;CharSet=utf8;"
}
}