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.

54 lines
1.3 KiB

1 year ago
1 year ago
  1. using Shentun.Pacs.Models;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using Volo.Abp.Domain.Entities;
  10. namespace Shentun.Pacs.Models
  11. {
  12. /// <summary>
  13. /// 房间对应的项目
  14. /// </summary>
  15. [Table("room_detail")]
  16. public class RoomDetail : Entity, IHasConcurrencyStamp
  17. {
  18. /// <summary>
  19. /// 组合项目ID
  20. /// </summary>
  21. [Key]
  22. [Column("asbitem_id")]
  23. public Guid AsbitemId { get; set; }
  24. /// <summary>
  25. /// 房间ID
  26. /// </summary>
  27. [Key]
  28. [Column("room_id")]
  29. public Guid RoomId { get; set; }
  30. [Column("concurrency_stamp")]
  31. public string ConcurrencyStamp { get; set; }
  32. [ForeignKey(nameof(AsbitemId))]
  33. [InverseProperty("RoomDetails")]
  34. public virtual Asbitem Asbitem { get; set; } = null!;
  35. [ForeignKey(nameof(RoomId))]
  36. [InverseProperty("RoomDetails")]
  37. public virtual Room Room { get; set; } = null!;
  38. public override object[] GetKeys()
  39. {
  40. return new object[] { AsbitemId, RoomId };
  41. }
  42. }
  43. }