Files
zsxt_nbzs_h5/Api/Ewide.Core/Entity/SysOrg.cs

113 lines
2.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
namespace Ewide.Core
{
/// <summary>
/// 组织机构表
/// </summary>
[Table("sys_org")]
[Comment("组织机构表")]
public class SysOrg : DEntityBase
{
/// <summary>
/// 父Id
/// </summary>
[Comment("父Id")]
[Column("Pid", TypeName = "varchar(36)")]
public string Pid { get; set; }
/// <summary>
/// 父Ids
/// </summary>
[Comment("Pids")]
public string Pids { get; set; }
/// <summary>
/// 名称
/// </summary>
[Comment("名称")]
[MaxLength(20)]
public string Name { get; set; }
/// <summary>
/// 编码
/// </summary>
[Comment("编码")]
public string Code { get; set; }
/// <summary>
/// 机构类型
/// </summary>
[Comment("机构类型")]
public int Type { get; set; }
/// <summary>
/// 联系人
/// </summary>
[Comment("联系人")]
public string Contacts { get; set; }
/// <summary>
/// 电话
/// </summary>
[Comment("电话")]
public string Tel { get; set; }
/// <summary>
/// 排序
/// </summary>
[Comment("排序")]
public int Sort { get; set; }
/// <summary>
/// 备注
/// </summary>
[Comment("备注")]
public string Remark { get; set; }
/// <summary>
/// 状态(字典 0正常 1停用 2删除
/// </summary>
[Comment("状态")]
public CommonStatus Status { get; set; } = CommonStatus.ENABLE;
public string AreaCode { get; set; }
/// <summary>
/// 一对一 一个组织对应一个区域代码
/// </summary>
[XmlIgnore]
public SysAreaCode Area { get; set; }
/// <summary>
/// 多对多(用户)
/// </summary>
[XmlIgnore]
public ICollection<SysUser> SysUsers { get; set; }
/// <summary>
/// 多对多中间表(用户数据范围)
/// </summary>
[XmlIgnore]
public List<SysUserDataScope> SysUserDataScopes { get; set; }
/// <summary>
/// 多对多(角色)
/// </summary>
[XmlIgnore]
public ICollection<SysRole> SysRoles { get; set; }
/// <summary>
/// 多对多中间表(角色数据范围)
/// </summary>
[XmlIgnore]
public List<SysRoleDataScope> SysRoleDataScopes { get; set; }
}
}