Browse Source

备份

master
wxd 1 year ago
parent
commit
166190b2b6
  1. 6
      src/Shentun.Peis.Domain/Departments/Department.cs
  2. 2
      src/Shentun.Peis.Domain/QueueRegisters/QueueRegister.cs
  3. 43
      src/Shentun.Peis.Domain/Rooms/Room.cs
  4. 9
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/Rooms/RoomDbMapping.cs

6
src/Shentun.Peis.Domain/Departments/Department.cs

@ -19,7 +19,7 @@ namespace Shentun.Peis.Models
{
// CardRegisters = new HashSet<CardRegister>();
OrganizationUnitsCustomerOrgs = new HashSet<OrganizationUnitsCustomerOrg>();
Rooms = new HashSet<Room>();
//Rooms = new HashSet<Room>();
ServiceTrades = new HashSet<ServiceTrade>();
UserDepartments = new HashSet<UserDepartment>();
Users = new HashSet<User>();
@ -69,8 +69,8 @@ namespace Shentun.Peis.Models
//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(Room.Department))]
//public virtual ICollection<Room> Rooms { get; set; }
[InverseProperty(nameof(ServiceTrade.Department))]
public virtual ICollection<ServiceTrade> ServiceTrades { get; set; }
[InverseProperty(nameof(UserDepartment.Department))]

2
src/Shentun.Peis.Domain/QueueRegisters/QueueRegister.cs

@ -26,7 +26,7 @@ namespace Shentun.Peis.Models
//[StringLength(5)]
public Guid RoomId { get; set; }
/// <summary>
/// 完成标志
/// 完成标志 (o=候诊 1=已呼 2=过号)
/// </summary>
[Column("complete_flag")]
[MaxLength(1)]

43
src/Shentun.Peis.Domain/Rooms/Room.cs

@ -27,20 +27,33 @@ namespace Shentun.Peis.Models
/// 项目类别编号
/// </summary>
[Column("item_type_id")]
//[StringLength(4)]
public Guid ItemTypeId { get; set; }
/// <summary>
///
/// 体检中心ID
/// </summary>
[Column("department_id")]
//[StringLength(4)]
public Guid OrganizationUnitId { get; set; }
[Column("medical_center_id")]
public Guid MedicalCenterId { get; set; }
[Column("for_sex_id")]
[MaxLength(1)]
public char ForSexId { get; set; }
/// <summary>
/// 0-普通,1-抽血室
/// </summary>
[Column("room_type_flag")]
[MaxLength(1)]
public char RoomTypeFlag { get; set; }
/// <summary>
/// 候诊时间
/// </summary>
[Column("queue_time")]
[Precision(3, 1)]
public decimal QueueTime { get; set; }
[Column("is_active")]
[MaxLength(1)]
public char IsActive { get; set; }
@ -53,21 +66,6 @@ namespace Shentun.Peis.Models
[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!;
[ForeignKey(nameof(OrganizationUnitId))]
[InverseProperty("Rooms")]
public virtual Department Department { get; set; } = null!;
[ForeignKey(nameof(ItemTypeId))]
[InverseProperty("Rooms")]
public virtual ItemType ItemType { get; set; } = null!;
@ -76,9 +74,6 @@ namespace Shentun.Peis.Models
[InverseProperty(nameof(Asbitem.Rooms))]
public virtual ICollection<Asbitem> Asbitems { get; set; }
//public override object[] GetKeys()
//{
// return new object[] { RoomId };
//}
}
}

9
src/Shentun.Peis.EntityFrameworkCore/DbMapping/Rooms/RoomDbMapping.cs

@ -17,23 +17,20 @@ namespace Shentun.Peis.DbMapping
entity.HasComment("房间设置");
entity.Property(t => t.ItemTypeId).HasComment("项目类别编号").IsRequired().IsFixedLength();
entity.Property(t => t.OrganizationUnitId).HasComment("");
entity.Property(t => t.MedicalCenterId).HasComment("体检中心");
entity.Property(e => e.Id).IsFixedLength();
//entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)");
entity.Property(e => e.OrganizationUnitId).IsFixedLength().IsRequired();
entity.Property(e => e.MedicalCenterId).IsFixedLength().IsRequired();
entity.Property(e => e.ForSexId).HasDefaultValueSql("'A'::bpchar").IsRequired();
entity.Property(e => e.RoomTypeFlag).HasDefaultValueSql("0").IsRequired();
entity.HasOne(d => d.Department)
.WithMany(p => p.Rooms)
.HasForeignKey(d => d.OrganizationUnitId)
.HasConstraintName("fk_room_department");
entity.HasOne(d => d.ItemType)
.WithMany(p => p.Rooms)

Loading…
Cancel
Save