1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- using Admin.Core.Common.BaseModel;
- using FreeSql.DataAnnotations;
- using System.Collections.Generic;
- namespace Admin.Core.Model.Personnel
- {
-
-
-
- [Table(Name = "pe_organization")]
- [Index("idx_{tablename}_01", nameof(ParentId) + "," + nameof(Name) + "," + nameof(TenantId), true)]
- public class OrganizationEntity : EntityFull, ITenant
- {
-
-
-
- [Column(Position = -10, CanUpdate = false)]
- public long? TenantId { get; set; }
-
-
-
- public long ParentId { get; set; }
- [Navigate(nameof(ParentId))]
- public List<OrganizationEntity> 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 long? PrimaryEmployeeId { get; set; }
-
-
-
- public EmployeeEntity PrimaryEmployee { 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<EmployeeEntity> Employees { get; set; }
- }
- }
|