You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
using System;using System.Collections.Generic;using System.ComponentModel.DataAnnotations;using System.ComponentModel.DataAnnotations.Schema;using Microsoft.EntityFrameworkCore;using Volo.Abp.Domain.Entities;using Volo.Abp.Domain.Entities.Auditing;
namespace Shentun.Peis.Models{ /// <summary>
/// 部门,已经废弃
/// </summary>
[Table("department")] [Index(nameof(DisplayName), nameof(ParentId), Name = "ix_department", IsUnique = true)] public class Department : AuditedEntity<Guid>, IHasConcurrencyStamp { public Department() { // CardRegisters = new HashSet<CardRegister>();
OrganizationUnitsCustomerOrgs = new HashSet<OrganizationUnitsCustomerOrg>(); //Rooms = new HashSet<Room>();
ServiceTrades = new HashSet<ServiceTrade>(); UserDepartments = new HashSet<UserDepartment>(); Users = new HashSet<User>(); } [Column("display_name")] [StringLength(20)] public string DisplayName { get; set; } = null!; [Column("parent_id")] [StringLength(4)] public Guid ParentId { get; set; } [Column("path_code")] [StringLength(50)] public string PathCode { get; set; } = null!; [Column("department_type_flag")] [MaxLength(1)] public char DepartmentTypeFlag { get; set; } [Column("code_prefix")] [StringLength(2)] public string? CodePrefix { get; set; } [Column("is_active")] [MaxLength(1)] public char IsActive { get; set; } [Column("simple_code")] [StringLength(20)] public string SimpleCode { get; set; } = null!; [Column("display_order")] public int DisplayOrder { get; set; }
[Column("concurrency_stamp")] public string ConcurrencyStamp { get; set; }
//[Column("last_modifier_id")]
//public Guid LastModifierId { get; set; }
//[Column("last_modification_time", TypeName = "timestamp without time zone")]
//public DateTime LastModificationTime { get; set; }
//[Column("creator_id")]
//public Guid CreatorId { get; set; }
//[Column("creation_time", TypeName = "timestamp without time zone")]
//public DateTime CreationTime { get; set; }
//[Column("concurrency_stamp")]
//[StringLength(40)]
//public string ConcurrencyStamp { get; set; } = null!;
//[InverseProperty(nameof(CardRegister.OrganizationUnit))]
//public virtual ICollection<CardRegister> CardRegisters { get; set; }
[InverseProperty(nameof(OrganizationUnitsCustomerOrg.OrganizationUnit))] public virtual ICollection<OrganizationUnitsCustomerOrg> OrganizationUnitsCustomerOrgs { get; set; } //[InverseProperty(nameof(Room.Department))]
//public virtual ICollection<Room> Rooms { get; set; }
[InverseProperty(nameof(ServiceTrade.Department))] public virtual ICollection<ServiceTrade> ServiceTrades { get; set; } [InverseProperty(nameof(UserDepartment.Department))] public virtual ICollection<UserDepartment> UserDepartments { get; set; } [InverseProperty(nameof(User.Department))] public virtual ICollection<User> Users { get; set; }
//public override object[] GetKeys()
//{
// return new object[] { DepartmentId };
//}
}}
|