update 区域管理名称修改等
This commit is contained in:
67
Api/Ewide.Core/Entity/SysAreaCode.cs
Normal file
67
Api/Ewide.Core/Entity/SysAreaCode.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
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
|
||||
{
|
||||
[Table("sys_area_code")]
|
||||
[Comment("区域表")]
|
||||
public class SysAreaCode: IEntity
|
||||
{
|
||||
[Key]
|
||||
[Comment("系统使用的区域代码")]
|
||||
[MaxLength(50)]
|
||||
public string Code { get; set; }
|
||||
[Comment("对外使用的区域代码")]
|
||||
[MaxLength(50)]
|
||||
public string ShowCode { get; set; }
|
||||
|
||||
[Comment("名称")]
|
||||
[Required]
|
||||
[MaxLength(100)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Comment("备注")]
|
||||
[MaxLength(1000)]
|
||||
public string Note { get; set; }
|
||||
|
||||
[Comment("类别")]
|
||||
[Required]
|
||||
public int LevelType { get; set; }
|
||||
|
||||
[Comment("排序")]
|
||||
public int Sort { get; set; }
|
||||
/// <summary>
|
||||
/// 父节点就是去掉后面两位
|
||||
/// </summary>
|
||||
public string ParentCode => LevelType>1?Code[0..(Code.Length-2)]:string.Empty;
|
||||
/// <summary>
|
||||
/// 多个区域有多个用户绑定自定义数据
|
||||
/// </summary>
|
||||
public ICollection<SysUser> SysUsers { get; set; }
|
||||
/// <summary>
|
||||
/// 中间表
|
||||
/// </summary>
|
||||
public List<SysUserArea> SysUserAreas { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 多个区域有多个角色绑定权限数据
|
||||
/// </summary>
|
||||
public ICollection<SysRole> SysRoles { get; set; }
|
||||
/// <summary>
|
||||
/// 中间表
|
||||
/// </summary>
|
||||
public List<SysRoleArea> SysRoleAreas { get; set; }
|
||||
/// <summary>
|
||||
/// 一个区域有多个组织
|
||||
/// </summary>
|
||||
public ICollection<SysOrg> SysOrgs { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user