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.

77 lines
2.6 KiB

3 years ago
3 years ago
3 years ago
2 years ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. using Microsoft.EntityFrameworkCore;
  6. using Volo.Abp.Domain.Entities;
  7. using Volo.Abp.Domain.Entities.Auditing;
  8. namespace Shentun.Peis.Models
  9. {
  10. /// <summary>
  11. /// 标本容器设置
  12. /// </summary>
  13. [Table("sample_container")]
  14. [Index(nameof(DisplayName), Name = "ix_sample_container", IsUnique = true)]
  15. public class SampleContainer : AuditedEntity<Guid>, IDisplayName, IDisplayOrder, IHasConcurrencyStamp
  16. {
  17. public SampleContainer()
  18. {
  19. // LisRequests = new HashSet<LisRequest>();
  20. SampleGroups = new HashSet<SampleGroup>();
  21. }
  22. [Column("display_name")]
  23. [StringLength(20)]
  24. public string DisplayName { get; set; } = null!;
  25. /// <summary>
  26. /// 颜色名
  27. /// </summary>
  28. [Column("container_color_name")]
  29. [StringLength(20)]
  30. public string ContainerColorName { get; set; } = null!;
  31. /// <summary>
  32. /// 颜色
  33. /// </summary>
  34. [Column("container_color")]
  35. public int ContainerColor { get; set; }
  36. [Column("simple_code")]
  37. [StringLength(20)]
  38. public string SimpleCode { get; set; } = null!;
  39. [Column("display_order")]
  40. public int DisplayOrder { get; set; }
  41. /// <summary>
  42. /// 备注
  43. /// </summary>
  44. [Column("container_remark")]
  45. [StringLength(500)]
  46. public string? ContainerRemark { get; set; }
  47. [Column("concurrency_stamp")]
  48. public string ConcurrencyStamp { get; set; }
  49. //[Column("last_modifier_id")]
  50. //public Guid LastModifierId { get; set; }
  51. //[Column("last_modification_time", TypeName = "timestamp without time zone")]
  52. //public DateTime LastModificationTime { get; set; }
  53. //[Column("creator_id")]
  54. //public Guid CreatorId { get; set; }
  55. //[Column("creation_time", TypeName = "timestamp without time zone")]
  56. //public DateTime CreationTime { get; set; }
  57. //[Column("concurrency_stamp")]
  58. //[StringLength(40)]
  59. //public string ConcurrencyStamp { get; set; } = null!;
  60. [InverseProperty(nameof(LisRequest.SampleContainer))]
  61. public virtual ICollection<LisRequest> LisRequests { get; set; }
  62. [InverseProperty(nameof(SampleGroup.SampleContainer))]
  63. public virtual ICollection<SampleGroup> SampleGroups { get; set; }
  64. //public override object[] GetKeys()
  65. //{
  66. // return new object[] { SampleContainerId };
  67. //}
  68. }
  69. }