using ZhonTai.Admin.Core.Entities; using FreeSql.DataAnnotations; using System.Collections.Generic; using ZhonTai.Admin.Domain.Employee; namespace ZhonTai.Admin.Domain.Organization { /// /// 组织架构 /// [Table(Name = "ad_organization")] [Index("idx_{tablename}_01", nameof(ParentId) + "," + nameof(Name) + "," + nameof(TenantId), true)] public partial class OrganizationEntity : EntityFull, ITenant { /// /// 租户Id /// [Column(Position = -10, CanUpdate = false)] public long? TenantId { get; set; } /// /// 父级 /// public long ParentId { get; set; } [Navigate(nameof(ParentId))] public List Childs { get; set; } /// /// 名称 /// [Column(StringLength = 50)] public string Name { get; set; } /// /// 编码 /// [Column(StringLength = 50)] public string Code { get; set; } /// /// 值 /// [Column(StringLength = 50)] public string Value { get; set; } /// /// 员工人数 /// public int EmployeeCount { get; set; } /// /// 描述 /// [Column(StringLength = 500)] public string Description { get; set; } /// /// 启用 /// public bool Enabled { get; set; } = true; /// /// 排序 /// public int Sort { get; set; } [Navigate(ManyToMany = typeof(EmployeeOrganizationEntity))] public ICollection Employees { get; set; } } }