From ed539892454fce13c2946f253b812fe6fbe1b168 Mon Sep 17 00:00:00 2001 From: Manuel Rodriguez Date: Fri, 26 Apr 2024 14:28:03 -0700 Subject: [PATCH 1/2] Generated scaffold --- source/backend/entities/PimsBaseContext.cs | 139 +++++++++++++++- .../entities/ef/PimsAcquisitionFile.cs | 6 - .../entities/ef/PimsAcquisitionFileHist.cs | 6 +- source/backend/entities/ef/PimsFileNumber.cs | 156 ++++++++++++++++++ .../backend/entities/ef/PimsFileNumberHist.cs | 96 +++++++++++ .../backend/entities/ef/PimsFileNumberType.cs | 79 +++++++++ source/backend/entities/ef/PimsProperty.cs | 42 +++++ 7 files changed, 512 insertions(+), 12 deletions(-) create mode 100644 source/backend/entities/ef/PimsFileNumber.cs create mode 100644 source/backend/entities/ef/PimsFileNumberHist.cs create mode 100644 source/backend/entities/ef/PimsFileNumberType.cs diff --git a/source/backend/entities/PimsBaseContext.cs b/source/backend/entities/PimsBaseContext.cs index 2d643e3d87..e5185e0e7a 100644 --- a/source/backend/entities/PimsBaseContext.cs +++ b/source/backend/entities/PimsBaseContext.cs @@ -222,6 +222,12 @@ public PimsBaseContext(DbContextOptions options) public virtual DbSet PimsFenceTypes { get; set; } + public virtual DbSet PimsFileNumbers { get; set; } + + public virtual DbSet PimsFileNumberHists { get; set; } + + public virtual DbSet PimsFileNumberTypes { get; set; } + public virtual DbSet PimsFinancialActivityCodes { get; set; } public virtual DbSet PimsFinancialActivityCodeHists { get; set; } @@ -878,7 +884,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(e => e.AssignedDate) .HasDefaultValueSql("(getutcdate())") .HasComment("Date of file assignment."); - entity.Property(e => e.CompletionDate).HasComment("Date of acquisition file completion."); entity.Property(e => e.ConcurrencyControlNumber).HasDefaultValue(1L); entity.Property(e => e.DbCreateTimestamp).HasDefaultValueSql("(getutcdate())"); entity.Property(e => e.DbCreateUserid).HasDefaultValueSql("(user_name())"); @@ -3505,6 +3510,113 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(e => e.IsDisabled).HasComment("Indicates if the code value is inactive."); }); + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.FileNumberId).HasName("FILNUM_PK"); + + entity.ToTable("PIMS_FILE_NUMBER", tb => + { + tb.HasComment("Table containing the file numbers associated with a property."); + tb.HasTrigger("PIMS_FILNUM_A_S_IUD_TR"); + tb.HasTrigger("PIMS_FILNUM_I_S_I_TR"); + tb.HasTrigger("PIMS_FILNUM_I_S_U_TR"); + }); + + entity.Property(e => e.FileNumberId) + .HasDefaultValueSql("(NEXT VALUE FOR [PIMS_FILE_NUMBER_ID_SEQ])") + .HasComment("Generated surrogate primary key"); + entity.Property(e => e.AppCreateTimestamp) + .HasDefaultValueSql("(getutcdate())") + .HasComment("The date and time the user created the record."); + entity.Property(e => e.AppCreateUserDirectory) + .HasDefaultValueSql("(user_name())") + .HasComment("The directory of the user account that created the record."); + entity.Property(e => e.AppCreateUserGuid).HasComment("The GUID of the user account that created the record."); + entity.Property(e => e.AppCreateUserid) + .HasDefaultValueSql("(user_name())") + .HasComment("The user account that created the record."); + entity.Property(e => e.AppLastUpdateTimestamp) + .HasDefaultValueSql("(getutcdate())") + .HasComment("The date and time the user updated the record."); + entity.Property(e => e.AppLastUpdateUserDirectory) + .HasDefaultValueSql("(user_name())") + .HasComment("The directory of the user account that updated the record."); + entity.Property(e => e.AppLastUpdateUserGuid).HasComment("The GUID of the user account that updated the record."); + entity.Property(e => e.AppLastUpdateUserid) + .HasDefaultValueSql("(user_name())") + .HasComment("The user account that updated the record."); + entity.Property(e => e.ConcurrencyControlNumber) + .HasDefaultValue(1L) + .HasComment("Application code is responsible for retrieving the row and then incrementing the value of the CONCURRENCY_CONTROL_NUMBER column by one prior to issuing an update. If this is done then the update will succeed, provided that the row was not updated by any o"); + entity.Property(e => e.DbCreateTimestamp) + .HasDefaultValueSql("(getutcdate())") + .HasComment("The date and time the record was created."); + entity.Property(e => e.DbCreateUserid) + .HasDefaultValueSql("(user_name())") + .HasComment("The user or proxy account that created the record."); + entity.Property(e => e.DbLastUpdateTimestamp) + .HasDefaultValueSql("(getutcdate())") + .HasComment("The date and time the record was created or last updated."); + entity.Property(e => e.DbLastUpdateUserid) + .HasDefaultValueSql("(user_name())") + .HasComment("The user or proxy account that created or last updated the record."); + entity.Property(e => e.FileNumber).HasComment("The file number value."); + entity.Property(e => e.FileNumberTypeCode).HasComment("Foreign key describing the file number type."); + entity.Property(e => e.IsDisabled) + .HasDefaultValue(false) + .HasComment("Indicates if the record is disabled."); + entity.Property(e => e.OtherFileNumberType).HasComment("Description of file number type that's not currently listed."); + entity.Property(e => e.PropertyId).HasComment("Foreign key to the PIMS_PROPERTY table."); + + entity.HasOne(d => d.FileNumberTypeCodeNavigation).WithMany(p => p.PimsFileNumbers) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("PIM_FLNMTY_PIM_FILNUM_FK"); + + entity.HasOne(d => d.Property).WithMany(p => p.PimsFileNumbers) + .OnDelete(DeleteBehavior.ClientSetNull) + .HasConstraintName("PIM_PRPRTY_PIM_FILNUM_FK"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.FileNumberHistId).HasName("PIMS_FILNUM_H_PK"); + + entity.Property(e => e.FileNumberHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_FILE_NUMBER_H_ID_SEQ])"); + entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())"); + }); + + modelBuilder.Entity(entity => + { + entity.HasKey(e => e.FileNumberTypeCode).HasName("FLNMTY_PK"); + + entity.ToTable("PIMS_FILE_NUMBER_TYPE", tb => + { + tb.HasComment("Code table to describe the type of property file number."); + tb.HasTrigger("PIMS_FLNMTY_I_S_I_TR"); + tb.HasTrigger("PIMS_FLNMTY_I_S_U_TR"); + }); + + entity.Property(e => e.FileNumberTypeCode).HasComment("Code representing the type of file number."); + entity.Property(e => e.ConcurrencyControlNumber) + .HasDefaultValue(1L) + .HasComment("Application code is responsible for retrieving the row and then incrementing the value of the CONCURRENCY_CONTROL_NUMBER column by one prior to issuing an update. If this is done then the update will succeed, provided that the row was not updated by any o"); + entity.Property(e => e.DbCreateTimestamp) + .HasDefaultValueSql("(getutcdate())") + .HasComment("The date and time the record was created."); + entity.Property(e => e.DbCreateUserid) + .HasDefaultValueSql("(user_name())") + .HasComment("The user or proxy account that created the record."); + entity.Property(e => e.DbLastUpdateTimestamp) + .HasDefaultValueSql("(getutcdate())") + .HasComment("The date and time the record was created or last updated."); + entity.Property(e => e.DbLastUpdateUserid) + .HasDefaultValueSql("(user_name())") + .HasComment("The user or proxy account that created or last updated the record."); + entity.Property(e => e.Description).HasComment("Description of the type of file number."); + entity.Property(e => e.DisplayOrder).HasComment("Force the display order of the codes."); + entity.Property(e => e.IsDisabled).HasComment("Indicates if the code is disabled."); + }); + modelBuilder.Entity(entity => { entity.HasKey(e => e.Id).HasName("FINACT_PK"); @@ -5591,8 +5703,11 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) tb.HasTrigger("PIMS_PRPRTY_I_S_U_TR"); }); - entity.Property(e => e.PropertyId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_PROPERTY_ID_SEQ])"); + entity.Property(e => e.PropertyId) + .HasDefaultValueSql("(NEXT VALUE FOR [PIMS_PROPERTY_ID_SEQ])") + .HasComment("Generated surrogate primary key"); entity.Property(e => e.AdditionalDetails).HasComment("Additional details about the property."); + entity.Property(e => e.AddressId).HasComment("Foreign key to the address table."); entity.Property(e => e.AppCreateTimestamp).HasDefaultValueSql("(getutcdate())"); entity.Property(e => e.AppLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())"); entity.Property(e => e.BandName).HasComment("Name of the Indian band."); @@ -5603,6 +5718,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(e => e.DbLastUpdateTimestamp).HasDefaultValueSql("(getutcdate())"); entity.Property(e => e.DbLastUpdateUserid).HasDefaultValueSql("(user_name())"); entity.Property(e => e.Description).HasComment("Property description"); + entity.Property(e => e.DistrictCode).HasComment("Foreign key to the district table."); entity.Property(e => e.EncumbranceReason).HasComment("reason for property encumbreance"); entity.Property(e => e.FileNumber).HasComment("The (ARCS/ORCS) number identifying the Property File."); entity.Property(e => e.FileNumberSuffix).HasComment("A suffix to distinguish between Property Files with the same number."); @@ -5630,16 +5746,27 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(e => e.Notes).HasComment("Notes about the property"); entity.Property(e => e.Pid).HasComment("Property ID"); entity.Property(e => e.Pin).HasComment("Property number"); + entity.Property(e => e.PphStatusTypeCode).HasComment("Foreign key to the provincial public highway status type table."); entity.Property(e => e.PphStatusUpdateTimestamp).HasComment("Date / time that the Provincial Public Highway status was updated."); entity.Property(e => e.PphStatusUpdateUserGuid).HasComment("GUID of the user that updated the PPH status."); entity.Property(e => e.PphStatusUpdateUserid).HasComment("Userid that updated the Provincial Public Highway status."); - entity.Property(e => e.PropertyClassificationTypeCode).HasDefaultValue("UNKNOWN"); + entity.Property(e => e.PropertyAreaUnitTypeCode).HasComment("Foreign key to the property area unit type table."); + entity.Property(e => e.PropertyClassificationTypeCode) + .HasDefaultValue("UNKNOWN") + .HasComment("Foreign key to the proeprty classification type table."); entity.Property(e => e.PropertyDataSourceEffectiveDate).HasComment("Date the property was officially registered"); + entity.Property(e => e.PropertyDataSourceTypeCode).HasComment("Foreign key to the property data source type table."); + entity.Property(e => e.PropertyStatusTypeCode).HasComment("Foreign key to the property status type table."); + entity.Property(e => e.PropertyTypeCode).HasComment("Foreign key to the proprty type table."); + entity.Property(e => e.RegionCode).HasComment("Foreign key to the region table."); entity.Property(e => e.ReserveName).HasComment("Name of the Indian reserve."); entity.Property(e => e.SurplusDeclarationComment).HasComment("Comment regarding the surplus declaration"); entity.Property(e => e.SurplusDeclarationDate).HasComment("Date the property was declared surplus"); + entity.Property(e => e.SurplusDeclarationTypeCode).HasComment("Foreign key to the surplus declaration type table."); entity.Property(e => e.SurveyPlanNumber).HasComment("Property/Land Parcel survey plan number"); + entity.Property(e => e.VolumeUnitTypeCode).HasComment("Foreign key to the volume unit type table."); entity.Property(e => e.VolumetricMeasurement).HasComment("Volumetric measurement of the parcel."); + entity.Property(e => e.VolumetricTypeCode).HasComment("Foreign key to the volumetric type table."); entity.Property(e => e.Zoning).HasComment("Current property zoning"); entity.Property(e => e.ZoningPotential).HasComment("Potential property zoning"); @@ -7916,6 +8043,12 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) modelBuilder.HasSequence("PIMS_FILE_ENTITY_PERMISSIONS_ID_SEQ") .HasMin(1L) .HasMax(2147483647L); + modelBuilder.HasSequence("PIMS_FILE_NUMBER_H_ID_SEQ") + .HasMin(1L) + .HasMax(2147483647L); + modelBuilder.HasSequence("PIMS_FILE_NUMBER_ID_SEQ") + .HasMin(1L) + .HasMax(2147483647L); modelBuilder.HasSequence("PIMS_FINANCIAL_ACTIVITY_CODE_H_ID_SEQ") .HasMin(1L) .HasMax(2147483647L); diff --git a/source/backend/entities/ef/PimsAcquisitionFile.cs b/source/backend/entities/ef/PimsAcquisitionFile.cs index d05630de96..0289e01fb8 100644 --- a/source/backend/entities/ef/PimsAcquisitionFile.cs +++ b/source/backend/entities/ef/PimsAcquisitionFile.cs @@ -110,12 +110,6 @@ public partial class PimsAcquisitionFile [Column("DELIVERY_DATE", TypeName = "datetime")] public DateTime? DeliveryDate { get; set; } - /// - /// Date of acquisition file completion. - /// - [Column("COMPLETION_DATE", TypeName = "datetime")] - public DateTime? CompletionDate { get; set; } - /// /// Legacy Acquisition File ID from the PAIMS system. /// diff --git a/source/backend/entities/ef/PimsAcquisitionFileHist.cs b/source/backend/entities/ef/PimsAcquisitionFileHist.cs index de58763626..13e4ee3ea3 100644 --- a/source/backend/entities/ef/PimsAcquisitionFileHist.cs +++ b/source/backend/entities/ef/PimsAcquisitionFileHist.cs @@ -81,9 +81,6 @@ public partial class PimsAcquisitionFileHist [Column("DELIVERY_DATE", TypeName = "datetime")] public DateTime? DeliveryDate { get; set; } - [Column("COMPLETION_DATE", TypeName = "datetime")] - public DateTime? CompletionDate { get; set; } - [Column("PAIMS_ACQUISITION_FILE_ID")] public int? PaimsAcquisitionFileId { get; set; } @@ -140,4 +137,7 @@ public partial class PimsAcquisitionFileHist [Column("DB_LAST_UPDATE_USERID")] [StringLength(30)] public string DbLastUpdateUserid { get; set; } + + [Column("COMPLETION_DATE", TypeName = "datetime")] + public DateTime? CompletionDate { get; set; } } diff --git a/source/backend/entities/ef/PimsFileNumber.cs b/source/backend/entities/ef/PimsFileNumber.cs new file mode 100644 index 0000000000..12e54b06d6 --- /dev/null +++ b/source/backend/entities/ef/PimsFileNumber.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Pims.Dal.Entities; + +/// +/// Table containing the file numbers associated with a property. +/// +[Table("PIMS_FILE_NUMBER")] +[Index("FileNumber", Name = "FILNUM_FILE_NUMBER_IDX")] +[Index("PropertyId", Name = "FILNUM_PROPERTY_ID_IDX")] +public partial class PimsFileNumber +{ + /// + /// Generated surrogate primary key + /// + [Key] + [Column("FILE_NUMBER_ID")] + public long FileNumberId { get; set; } + + /// + /// Foreign key to the PIMS_PROPERTY table. + /// + [Column("PROPERTY_ID")] + public long PropertyId { get; set; } + + /// + /// Foreign key describing the file number type. + /// + [Required] + [Column("FILE_NUMBER_TYPE_CODE")] + [StringLength(20)] + public string FileNumberTypeCode { get; set; } + + /// + /// The file number value. + /// + [Required] + [Column("FILE_NUMBER")] + [StringLength(500)] + public string FileNumber { get; set; } + + /// + /// Description of file number type that's not currently listed. + /// + [Column("OTHER_FILE_NUMBER_TYPE")] + [StringLength(200)] + public string OtherFileNumberType { get; set; } + + /// + /// Indicates if the record is disabled. + /// + [Column("IS_DISABLED")] + public bool? IsDisabled { get; set; } + + /// + /// Application code is responsible for retrieving the row and then incrementing the value of the CONCURRENCY_CONTROL_NUMBER column by one prior to issuing an update. If this is done then the update will succeed, provided that the row was not updated by any o + /// + [Column("CONCURRENCY_CONTROL_NUMBER")] + public long ConcurrencyControlNumber { get; set; } + + /// + /// The date and time the user created the record. + /// + [Column("APP_CREATE_TIMESTAMP", TypeName = "datetime")] + public DateTime AppCreateTimestamp { get; set; } + + /// + /// The user account that created the record. + /// + [Required] + [Column("APP_CREATE_USERID")] + [StringLength(30)] + public string AppCreateUserid { get; set; } + + /// + /// The GUID of the user account that created the record. + /// + [Column("APP_CREATE_USER_GUID")] + public Guid? AppCreateUserGuid { get; set; } + + /// + /// The directory of the user account that created the record. + /// + [Required] + [Column("APP_CREATE_USER_DIRECTORY")] + [StringLength(30)] + public string AppCreateUserDirectory { get; set; } + + /// + /// The date and time the user updated the record. + /// + [Column("APP_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")] + public DateTime AppLastUpdateTimestamp { get; set; } + + /// + /// The user account that updated the record. + /// + [Required] + [Column("APP_LAST_UPDATE_USERID")] + [StringLength(30)] + public string AppLastUpdateUserid { get; set; } + + /// + /// The GUID of the user account that updated the record. + /// + [Column("APP_LAST_UPDATE_USER_GUID")] + public Guid? AppLastUpdateUserGuid { get; set; } + + /// + /// The directory of the user account that updated the record. + /// + [Required] + [Column("APP_LAST_UPDATE_USER_DIRECTORY")] + [StringLength(30)] + public string AppLastUpdateUserDirectory { get; set; } + + /// + /// The date and time the record was created. + /// + [Column("DB_CREATE_TIMESTAMP", TypeName = "datetime")] + public DateTime DbCreateTimestamp { get; set; } + + /// + /// The user or proxy account that created the record. + /// + [Required] + [Column("DB_CREATE_USERID")] + [StringLength(30)] + public string DbCreateUserid { get; set; } + + /// + /// The date and time the record was created or last updated. + /// + [Column("DB_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")] + public DateTime DbLastUpdateTimestamp { get; set; } + + /// + /// The user or proxy account that created or last updated the record. + /// + [Required] + [Column("DB_LAST_UPDATE_USERID")] + [StringLength(30)] + public string DbLastUpdateUserid { get; set; } + + [ForeignKey("FileNumberTypeCode")] + [InverseProperty("PimsFileNumbers")] + public virtual PimsFileNumberType FileNumberTypeCodeNavigation { get; set; } + + [ForeignKey("PropertyId")] + [InverseProperty("PimsFileNumbers")] + public virtual PimsProperty Property { get; set; } +} diff --git a/source/backend/entities/ef/PimsFileNumberHist.cs b/source/backend/entities/ef/PimsFileNumberHist.cs new file mode 100644 index 0000000000..6a8dd58991 --- /dev/null +++ b/source/backend/entities/ef/PimsFileNumberHist.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Pims.Dal.Entities; + +[Table("PIMS_FILE_NUMBER_HIST")] +[Index("FileNumberHistId", "EndDateHist", Name = "PIMS_FILNUM_H_UK", IsUnique = true)] +public partial class PimsFileNumberHist +{ + [Key] + [Column("_FILE_NUMBER_HIST_ID")] + public long FileNumberHistId { get; set; } + + [Column("EFFECTIVE_DATE_HIST", TypeName = "datetime")] + public DateTime EffectiveDateHist { get; set; } + + [Column("END_DATE_HIST", TypeName = "datetime")] + public DateTime? EndDateHist { get; set; } + + [Column("FILE_NUMBER_ID")] + public long FileNumberId { get; set; } + + [Column("PROPERTY_ID")] + public long PropertyId { get; set; } + + [Required] + [Column("FILE_NUMBER_TYPE_CODE")] + [StringLength(20)] + public string FileNumberTypeCode { get; set; } + + [Required] + [Column("FILE_NUMBER")] + [StringLength(500)] + public string FileNumber { get; set; } + + [Column("OTHER_FILE_NUMBER_TYPE")] + [StringLength(200)] + public string OtherFileNumberType { get; set; } + + [Column("IS_DISABLED")] + public bool? IsDisabled { get; set; } + + [Column("CONCURRENCY_CONTROL_NUMBER")] + public long ConcurrencyControlNumber { get; set; } + + [Column("APP_CREATE_TIMESTAMP", TypeName = "datetime")] + public DateTime AppCreateTimestamp { get; set; } + + [Required] + [Column("APP_CREATE_USERID")] + [StringLength(30)] + public string AppCreateUserid { get; set; } + + [Column("APP_CREATE_USER_GUID")] + public Guid? AppCreateUserGuid { get; set; } + + [Required] + [Column("APP_CREATE_USER_DIRECTORY")] + [StringLength(30)] + public string AppCreateUserDirectory { get; set; } + + [Column("APP_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")] + public DateTime AppLastUpdateTimestamp { get; set; } + + [Required] + [Column("APP_LAST_UPDATE_USERID")] + [StringLength(30)] + public string AppLastUpdateUserid { get; set; } + + [Column("APP_LAST_UPDATE_USER_GUID")] + public Guid? AppLastUpdateUserGuid { get; set; } + + [Required] + [Column("APP_LAST_UPDATE_USER_DIRECTORY")] + [StringLength(30)] + public string AppLastUpdateUserDirectory { get; set; } + + [Column("DB_CREATE_TIMESTAMP", TypeName = "datetime")] + public DateTime DbCreateTimestamp { get; set; } + + [Required] + [Column("DB_CREATE_USERID")] + [StringLength(30)] + public string DbCreateUserid { get; set; } + + [Column("DB_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")] + public DateTime DbLastUpdateTimestamp { get; set; } + + [Required] + [Column("DB_LAST_UPDATE_USERID")] + [StringLength(30)] + public string DbLastUpdateUserid { get; set; } +} diff --git a/source/backend/entities/ef/PimsFileNumberType.cs b/source/backend/entities/ef/PimsFileNumberType.cs new file mode 100644 index 0000000000..38bba76f6b --- /dev/null +++ b/source/backend/entities/ef/PimsFileNumberType.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using Microsoft.EntityFrameworkCore; + +namespace Pims.Dal.Entities; + +/// +/// Code table to describe the type of property file number. +/// +[Table("PIMS_FILE_NUMBER_TYPE")] +public partial class PimsFileNumberType +{ + /// + /// Code representing the type of file number. + /// + [Key] + [Column("FILE_NUMBER_TYPE_CODE")] + [StringLength(20)] + public string FileNumberTypeCode { get; set; } + + /// + /// Description of the type of file number. + /// + [Required] + [Column("DESCRIPTION")] + [StringLength(200)] + public string Description { get; set; } + + /// + /// Indicates if the code is disabled. + /// + [Column("IS_DISABLED")] + public bool IsDisabled { get; set; } + + /// + /// Force the display order of the codes. + /// + [Column("DISPLAY_ORDER")] + public int? DisplayOrder { get; set; } + + /// + /// Application code is responsible for retrieving the row and then incrementing the value of the CONCURRENCY_CONTROL_NUMBER column by one prior to issuing an update. If this is done then the update will succeed, provided that the row was not updated by any o + /// + [Column("CONCURRENCY_CONTROL_NUMBER")] + public long ConcurrencyControlNumber { get; set; } + + /// + /// The date and time the record was created. + /// + [Column("DB_CREATE_TIMESTAMP", TypeName = "datetime")] + public DateTime DbCreateTimestamp { get; set; } + + /// + /// The user or proxy account that created the record. + /// + [Required] + [Column("DB_CREATE_USERID")] + [StringLength(30)] + public string DbCreateUserid { get; set; } + + /// + /// The date and time the record was created or last updated. + /// + [Column("DB_LAST_UPDATE_TIMESTAMP", TypeName = "datetime")] + public DateTime DbLastUpdateTimestamp { get; set; } + + /// + /// The user or proxy account that created or last updated the record. + /// + [Required] + [Column("DB_LAST_UPDATE_USERID")] + [StringLength(30)] + public string DbLastUpdateUserid { get; set; } + + [InverseProperty("FileNumberTypeCodeNavigation")] + public virtual ICollection PimsFileNumbers { get; set; } = new List(); +} diff --git a/source/backend/entities/ef/PimsProperty.cs b/source/backend/entities/ef/PimsProperty.cs index a10d5f8619..07621f0630 100644 --- a/source/backend/entities/ef/PimsProperty.cs +++ b/source/backend/entities/ef/PimsProperty.cs @@ -29,55 +29,94 @@ namespace Pims.Dal.Entities; [Index("VolumeUnitTypeCode", Name = "PRPRTY_VOLUME_UNIT_TYPE_CODE_IDX")] public partial class PimsProperty { + /// + /// Generated surrogate primary key + /// [Key] [Column("PROPERTY_ID")] public long PropertyId { get; set; } + /// + /// Foreign key to the proprty type table. + /// [Required] [Column("PROPERTY_TYPE_CODE")] [StringLength(20)] public string PropertyTypeCode { get; set; } + /// + /// Foreign key to the address table. + /// [Column("ADDRESS_ID")] public long? AddressId { get; set; } + /// + /// Foreign key to the region table. + /// [Column("REGION_CODE")] public short RegionCode { get; set; } + /// + /// Foreign key to the district table. + /// [Column("DISTRICT_CODE")] public short DistrictCode { get; set; } + /// + /// Foreign key to the property area unit type table. + /// [Column("PROPERTY_AREA_UNIT_TYPE_CODE")] [StringLength(20)] public string PropertyAreaUnitTypeCode { get; set; } + /// + /// Foreign key to the property data source type table. + /// [Required] [Column("PROPERTY_DATA_SOURCE_TYPE_CODE")] [StringLength(20)] public string PropertyDataSourceTypeCode { get; set; } + /// + /// Foreign key to the property status type table. + /// [Required] [Column("PROPERTY_STATUS_TYPE_CODE")] [StringLength(20)] public string PropertyStatusTypeCode { get; set; } + /// + /// Foreign key to the surplus declaration type table. + /// [Required] [Column("SURPLUS_DECLARATION_TYPE_CODE")] [StringLength(20)] public string SurplusDeclarationTypeCode { get; set; } + /// + /// Foreign key to the volumetric type table. + /// [Column("VOLUMETRIC_TYPE_CODE")] [StringLength(20)] public string VolumetricTypeCode { get; set; } + /// + /// Foreign key to the volume unit type table. + /// [Column("VOLUME_UNIT_TYPE_CODE")] [StringLength(20)] public string VolumeUnitTypeCode { get; set; } + /// + /// Foreign key to the provincial public highway status type table. + /// [Column("PPH_STATUS_TYPE_CODE")] [StringLength(20)] public string PphStatusTypeCode { get; set; } + /// + /// Foreign key to the proeprty classification type table. + /// [Required] [Column("PROPERTY_CLASSIFICATION_TYPE_CODE")] [StringLength(20)] @@ -375,6 +414,9 @@ public partial class PimsProperty [InverseProperty("Property")] public virtual ICollection PimsDispositionFileProperties { get; set; } = new List(); + [InverseProperty("Property")] + public virtual ICollection PimsFileNumbers { get; set; } = new List(); + [InverseProperty("Property")] public virtual ICollection PimsPropPropActivities { get; set; } = new List(); From fa6a1ad07c749037f178b37922a385ebf2321cfe Mon Sep 17 00:00:00 2001 From: Manuel Rodriguez Date: Fri, 26 Apr 2024 14:30:32 -0700 Subject: [PATCH 2/2] Compilation fixes --- source/backend/api/Services/AcquisitionFileService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/backend/api/Services/AcquisitionFileService.cs b/source/backend/api/Services/AcquisitionFileService.cs index 3008693cec..f8abd4c56c 100644 --- a/source/backend/api/Services/AcquisitionFileService.cs +++ b/source/backend/api/Services/AcquisitionFileService.cs @@ -124,7 +124,7 @@ public List GetAcquisitionFileExport(AcquisitionFilt FileFunding = fileProperty.file.AcquisitionFundingTypeCodeNavigation is not null ? fileProperty.file.AcquisitionFundingTypeCodeNavigation.Description : string.Empty, FileAssignedDate = fileProperty.file.AssignedDate.HasValue ? fileProperty.file.AssignedDate.Value.ToString("dd-MMM-yyyy") : string.Empty, FileDeliveryDate = fileProperty.file.DeliveryDate.HasValue ? fileProperty.file.DeliveryDate.Value.ToString("dd-MMM-yyyy") : string.Empty, - FileAcquisitionCompleted = fileProperty.file.CompletionDate.HasValue ? fileProperty.file.CompletionDate.Value.ToString("dd-MMM-yyyy") : string.Empty, + //FileAcquisitionCompleted = fileProperty.file.CompletionDate.HasValue ? fileProperty.file.CompletionDate.Value.ToString("dd-MMM-yyyy") : string.Empty, TODO: Fix mappings FilePhysicalStatus = fileProperty.file.AcqPhysFileStatusTypeCodeNavigation is not null ? fileProperty.file.AcqPhysFileStatusTypeCodeNavigation.Description : string.Empty, FileAcquisitionType = fileProperty.file.AcquisitionTypeCodeNavigation is not null ? fileProperty.file.AcquisitionTypeCodeNavigation.Description : string.Empty, FileAcquisitionTeam = string.Join(", ", fileProperty.file.PimsAcquisitionFileTeams.Select(x => x.PersonId.HasValue ? x.Person.GetFullName(true) : x.Organization.Name)),