using Microsoft.EntityFrameworkCore; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; using System.Xml.Serialization; namespace Ewide.Core { /// /// 组织机构表 /// [Table("sys_org")] [Comment("组织机构表")] public class SysOrg : DEntityBase { /// /// 父Id /// [Comment("父Id")] [Column("Pid", TypeName = "varchar(36)")] public string Pid { get; set; } /// /// 父Ids /// [Comment("Pids")] public string Pids { get; set; } /// /// 名称 /// [Comment("名称")] public string Name { get; set; } /// /// 编码 /// [Comment("编码")] public string Code { get; set; } /// /// 机构类型 /// [Comment("机构类型")] public int Type { get; set; } /// /// 联系人 /// [Comment("联系人")] public string Contacts { get; set; } /// /// 电话 /// [Comment("电话")] public string Tel { get; set; } /// /// 排序 /// [Comment("排序")] public int Sort { get; set; } /// /// 备注 /// [Comment("备注")] public string Remark { get; set; } /// /// 状态(字典 0正常 1停用 2删除) /// [Comment("状态")] public CommonStatus Status { get; set; } = CommonStatus.ENABLE; public string AreaCode { get; set; } /// /// 一对一 一个组织对应一个区域代码 /// [XmlIgnore] public SysAreaCode Area { get; set; } /// /// 多对多(用户) /// [XmlIgnore] public ICollection SysUsers { get; set; } /// /// 多对多中间表(用户数据范围) /// [XmlIgnore] public List SysUserDataScopes { get; set; } /// /// 多对多(角色) /// [XmlIgnore] public ICollection SysRoles { get; set; } /// /// 多对多中间表(角色数据范围) /// [XmlIgnore] public List SysRoleDataScopes { get; set; } } }