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 Microsoft.EntityFrameworkCore;using System;using System.Collections.Generic;using System.ComponentModel.DataAnnotations;using System.ComponentModel.DataAnnotations.Schema;using Volo.Abp.Domain.Entities;using Volo.Abp.Domain.Entities.Auditing;using Volo.Abp.Identity;
namespace Shentun.Peis.Models{ /// <summary>
/// 团检单位设置
/// </summary>
[Table("customer_org")] [Index(nameof(MedicalCenterId), Name = "fki_fk_customer_org_organization_units")] [Index(nameof(ParentId), nameof(DisplayName), Name = "ix_org", IsUnique = true)] public class CustomerOrg : AuditedEntity<Guid>, IDisplayName, IDisplayOrder, IHasConcurrencyStamp { public CustomerOrg() { ContactPeople = new HashSet<ContactPerson>(); CustomerOrgRegisters = new HashSet<CustomerOrgRegister>(); OrganizationUnitsCustomerOrgs = new HashSet<OrganizationUnitsCustomerOrg>(); } public CustomerOrg(Guid id):base(id) { ContactPeople = new HashSet<ContactPerson>(); CustomerOrgRegisters = new HashSet<CustomerOrgRegister>(); OrganizationUnitsCustomerOrgs = new HashSet<OrganizationUnitsCustomerOrg>(); }
/// <summary>
/// 单位名称
/// </summary>
[Column("display_name")] [StringLength(50)] public string DisplayName { get; set; } = null!; /// <summary>
/// 简称
/// </summary>
[Column("short_name")] [StringLength(50)] public string? ShortName { get; set; } /// <summary>
/// 开票名称
/// </summary>
[Column("invoice_name")] [StringLength(50)] public string? InvoiceName { get; set; } /// <summary>
/// 父编号
/// </summary>
[Column("parent_id")] //[StringLength(8)]
public Guid? ParentId { get; set; } /// <summary>
/// 路径编码
/// </summary>
[Column("path_code")] [StringLength(60)] public string PathCode { get; set; } = null!; /// <summary>
/// 联系电话
/// </summary>
[Column("telephone")] [StringLength(50)] public string? Telephone { get; set; } /// <summary>
/// 传真
/// </summary>
[Column("fax")] [StringLength(30)] public string? Fax { get; set; } /// <summary>
/// 邮政编码
/// </summary>
[Column("postal_code")] [StringLength(30)] public string? PostalCode { get; set; } /// <summary>
/// 联系地址
/// </summary>
[Column("address")] [StringLength(100)] public string? Address { get; set; } /// <summary>
/// 业务银行
/// </summary>
[Column("bank")] [StringLength(100)] public string? Bank { get; set; } /// <summary>
/// 银行帐号
/// </summary>
[Column("accounts")] [StringLength(100)] public string? Accounts { get; set; } /// <summary>
/// 单位性质
/// </summary>
[Column("org_type_id")] public Guid OrgTypeId { get; set; } /// <summary>
/// 拼音简码
/// </summary>
[Column("simple_code")] [StringLength(50)] public string SimpleCode { get; set; } = null!; /// <summary>
/// 备注
/// </summary>
[Column("remark")] [StringLength(100)] public string? Remark { get; set; } /// <summary>
/// 锁住
/// </summary>
[Column("is_lock")] [MaxLength(1)] public char IsLock { get; set; } /// <summary>
/// 状态
/// </summary>
[Column("is_active")] [MaxLength(1)] public char IsActive { get; set; } /// <summary>
/// 显示顺序
/// </summary>
[Column("display_order")] public int DisplayOrder { get; set; }
[Column("concurrency_stamp")] public string ConcurrencyStamp { get; set; }
/// <summary>
/// 国家组织机构代码
/// </summary>
[Column("country_org_code")] [StringLength(20)] public string CountryOrgCode { get; set; }
/// <summary>
/// 销售员
/// </summary>
[Column("sales_person")] [StringLength(50)] public string SalesPerson { get; set; }
/// <summary>
/// 销售员电话
/// </summary>
[Column("sales_person_phone")] [StringLength(20)] public string SalesPersonPhone { get; set; }
/// <summary>
/// 单位编码 兼容老系统
/// </summary>
[Column("customer_org_code")] [StringLength(50)] public string CustomerOrgCode { get; set; }
//[Column("creator_id")]
//public Guid CreatorId { get; set; }
//[Column("creation_time", TypeName = "timestamp without time zone")]
//public DateTime CreationTime { get; set; }
///// <summary>
///// 最后修改者
///// </summary>
//[Column("last_modifier_id")]
//public Guid LastModifierId { get; set; }
///// <summary>
///// 最后修改日期
///// </summary>
//[Column("last_modification_time", TypeName = "timestamp without time zone")]
//public DateTime LastModificationTime { get; set; }
[Column("medical_center_id")] public Guid MedicalCenterId { get; set; }
/// <summary>
/// 体检类别id
/// </summary>
[Column("medical_type_id")] public Guid? MedicalTypeId { get; set; } //[Column("concurrency_stamp")]
//[StringLength(40)]
//public string ConcurrencyStamp { get; set; } = null!;
//[ForeignKey(nameof(OrganizationUnitId))]
//[InverseProperty(nameof(OrganizationUnit.CustomerOrgs))]
//public virtual OrganizationUnit OrganizationUnit { get; set; } = null!;
[InverseProperty(nameof(ContactPerson.CustomerOrg))] public virtual ICollection<ContactPerson> ContactPeople { get; set; } [InverseProperty(nameof(CustomerOrgRegister.CustomerOrg))] public virtual ICollection<CustomerOrgRegister> CustomerOrgRegisters { get; set; } [InverseProperty(nameof(OrganizationUnitsCustomerOrg.CustomerOrg))] public virtual ICollection<OrganizationUnitsCustomerOrg> OrganizationUnitsCustomerOrgs { get; set; }
//public override object[] GetKeys()
//{
// return new object[] { CustomerOrgId };
//}
}}
|