Skip to content

Commit

Permalink
Scaffold s74 (#3803)
Browse files Browse the repository at this point in the history
* Regenerated scaffold

* Fixes compilation
  • Loading branch information
FuriousLlama authored Feb 20, 2024
1 parent 22d8122 commit 1b949b6
Show file tree
Hide file tree
Showing 11 changed files with 493 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ public void Register(TypeAdapterConfig config)
.Map(dest => dest.CompletionDateOnly, src => src.CompletionDt)
.Map(dest => dest.Description, src => src.Description)
.Map(dest => dest.RequestSource, src => src.RequestSource)
.Map(dest => dest.PretaxAmt, src => src.PretaxAmt)
.Map(dest => dest.GstAmt, src => src.GstAmt)
.Map(dest => dest.PstAmt, src => src.PstAmt)
.Map(dest => dest.TotalAmt, src => src.TotalAmt)
//.Map(dest => dest.PretaxAmt, src => src.PretaxAmt) // TODO: Fix mapping
//.Map(dest => dest.GstAmt, src => src.GstAmt)
//.Map(dest => dest.PstAmt, src => src.PstAmt)
//.Map(dest => dest.TotalAmt, src => src.TotalAmt)
.Map(dest => dest.IsDisabled, src => src.IsDisabled)
.Map(dest => dest.ServiceProviderOrgId, src => src.ServiceProviderOrgId)
.Map(dest => dest.ServiceProviderOrg, src => src.ServiceProviderOrg)
Expand All @@ -43,10 +43,10 @@ public void Register(TypeAdapterConfig config)
.Map(dest => dest.CompletionDt, src => src.CompletionDateOnly)
.Map(dest => dest.Description, src => src.Description)
.Map(dest => dest.RequestSource, src => src.RequestSource)
.Map(dest => dest.PretaxAmt, src => src.PretaxAmt)
.Map(dest => dest.GstAmt, src => src.GstAmt)
.Map(dest => dest.PstAmt, src => src.PstAmt)
.Map(dest => dest.TotalAmt, src => src.TotalAmt)
//.Map(dest => dest.PretaxAmt, src => src.PretaxAmt)
//.Map(dest => dest.GstAmt, src => src.GstAmt)
//.Map(dest => dest.PstAmt, src => src.PstAmt)
//.Map(dest => dest.TotalAmt, src => src.TotalAmt)
.Map(dest => dest.IsDisabled, src => src.IsDisabled)
.Map(dest => dest.ServiceProviderOrgId, src => src.ServiceProviderOrgId)
.Map(dest => dest.ServiceProviderPersonId, src => src.ServiceProviderPersonId)
Expand Down
133 changes: 126 additions & 7 deletions source/backend/entities/PimsBaseContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,12 @@ public PimsBaseContext(DbContextOptions<PimsBaseContext> options)

public virtual DbSet<PimsPropertyLocationVw> PimsPropertyLocationVws { get; set; }

public virtual DbSet<PimsPropertyOperation> PimsPropertyOperations { get; set; }

public virtual DbSet<PimsPropertyOperationHist> PimsPropertyOperationHists { get; set; }

public virtual DbSet<PimsPropertyOperationType> PimsPropertyOperationTypes { get; set; }

public virtual DbSet<PimsPropertyOrganization> PimsPropertyOrganizations { get; set; }

public virtual DbSet<PimsPropertyOrganizationHist> PimsPropertyOrganizationHists { get; set; }
Expand Down Expand Up @@ -5608,6 +5614,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasComment("Is the property currently owned?");
entity.Property(e => e.IsPropertyOfInterest).HasComment("Is this a property of interest to the Ministry?");
entity.Property(e => e.IsProvincialPublicHwy).HasComment("Is this property a provincial public highway?");
entity.Property(e => e.IsRetired).HasComment("If the property was the source of a subdivision operation or the target of a consolidation operation, the property is marked as retired.");
entity.Property(e => e.IsRwyBeltDomPatent)
.HasDefaultValue(false)
.HasComment("Indicates if this property is original federal vs. provincial ownership.");
Expand Down Expand Up @@ -5746,11 +5753,9 @@ 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("Description of the property management activity.");
entity.Property(e => e.GstAmt).HasComment("GST on the management activity.");
entity.Property(e => e.IsDisabled)
.HasDefaultValue(false)
.HasComment("Indicates if the code is disabled.");
entity.Property(e => e.PretaxAmt).HasComment("Subtotal of the management activity cost.");
entity.Property(e => e.PropMgmtActivityStatusTypeCode)
.HasDefaultValue("NOTSTARTED")
.HasComment("Status of the property management activity.");
Expand All @@ -5760,12 +5765,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.PropMgmtActivityTypeCode)
.HasDefaultValue("UNKNOWN")
.HasComment("Type of property management activity.");
entity.Property(e => e.PstAmt).HasComment("PST on the management activity.");
entity.Property(e => e.RequestAddedDt).HasComment("Date the request for a property management activity was added");
entity.Property(e => e.RequestSource).HasComment("Source of the management activity request.");
entity.Property(e => e.ServiceProviderOrgId).HasComment("Foreign key of the organization as a service provider.");
entity.Property(e => e.ServiceProviderPersonId).HasComment("Foreign key of the person as a service provider.");
entity.Property(e => e.TotalAmt).HasComment("Total cost of the management activity.");

entity.HasOne(d => d.PropMgmtActivityStatusTypeCodeNavigation).WithMany(p => p.PimsPropertyActivities)
.OnDelete(DeleteBehavior.ClientSetNull)
Expand Down Expand Up @@ -6099,6 +6102,116 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.ToView("PIMS_PROPERTY_LOCATION_VW");
});

modelBuilder.Entity<PimsPropertyOperation>(entity =>
{
entity.HasKey(e => e.PropertyOperationId).HasName("PROPOP_PK");

entity.ToTable("PIMS_PROPERTY_OPERATION", tb =>
{
tb.HasComment("Defines the operations that are associated with properties. These operations conccern property consolidations and suvdivisions.");
tb.HasTrigger("PIMS_PROPOP_A_S_IUD_TR");
tb.HasTrigger("PIMS_PROPOP_I_S_I_TR");
tb.HasTrigger("PIMS_PROPOP_I_S_U_TR");
});

entity.Property(e => e.PropertyOperationId)
.HasDefaultValueSql("(NEXT VALUE FOR [PIMS_PROPERTY_OPERATION_ID_SEQ])")
.HasComment("Surrogate sequence-based generated primary key for the table. This is used internally to enforce data uniqueness.");
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.DestinationPropertyId).HasComment("Foreign key to the destination property of the property operation.");
entity.Property(e => e.IsDisabled)
.HasDefaultValue(false)
.HasComment("Indicates if the record is disabled.");
entity.Property(e => e.OperationDt).HasComment("Business date of the property operation.");
entity.Property(e => e.PropertyOperationNo).HasComment("Sequence-based operation identifying business key. This is used to help identify when multiple properties were involved in a discrete operation. The sequence number referenced is PIMS_PROPERTY_OPERATION_NO_SEQ.");
entity.Property(e => e.PropertyOperationTypeCode).HasComment("Foriegn key to the descriptive operation type code.");
entity.Property(e => e.SourcePropertyId).HasComment("Foreign key to the source property of the property operation.");

entity.HasOne(d => d.DestinationProperty).WithMany(p => p.PimsPropertyOperationDestinationProperties)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("PIM_PRPRTY_PIM_PROPOP_DST_FK");

entity.HasOne(d => d.PropertyOperationTypeCodeNavigation).WithMany(p => p.PimsPropertyOperations).HasConstraintName("PIM_PRPOTY_PIM_PROPOP_FK");

entity.HasOne(d => d.SourceProperty).WithMany(p => p.PimsPropertyOperationSourceProperties)
.OnDelete(DeleteBehavior.ClientSetNull)
.HasConstraintName("PIM_PRPRTY_PIM_PROPOP_SRC_FK");
});

modelBuilder.Entity<PimsPropertyOperationHist>(entity =>
{
entity.HasKey(e => e.PropertyOperationHistId).HasName("PIMS_PROPOP_H_PK");

entity.Property(e => e.PropertyOperationHistId).HasDefaultValueSql("(NEXT VALUE FOR [PIMS_PROPERTY_OPERATION_H_ID_SEQ])");
entity.Property(e => e.EffectiveDateHist).HasDefaultValueSql("(getutcdate())");
});

modelBuilder.Entity<PimsPropertyOperationType>(entity =>
{
entity.HasKey(e => e.PropertyOperationTypeCode).HasName("PRPOTY_PK");

entity.ToTable("PIMS_PROPERTY_OPERATION_TYPE", tb =>
{
tb.HasComment("Code table to describe the type of property operation. Currently, property operations are consolidations and subdivisions.");
tb.HasTrigger("PIMS_PRPOTY_I_S_I_TR");
tb.HasTrigger("PIMS_PRPOTY_I_S_U_TR");
});

entity.Property(e => e.PropertyOperationTypeCode).HasComment("Code representing the type of property operation.");
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 property operation.");
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<PimsPropertyOrganization>(entity =>
{
entity.HasKey(e => e.PropertyOrganizationId).HasName("PRPORG_PK");
Expand Down Expand Up @@ -8030,9 +8143,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
modelBuilder.HasSequence("PIMS_PROP_PROP_ANOMALY_TYPE_ID_SEQ")
.HasMin(1L)
.HasMax(2147483647L);
modelBuilder.HasSequence("PIMS_PROP_PROP_CLASSIFICATION_H_ID_SEQ")
.HasMin(1L)
.HasMax(2147483647L);
modelBuilder.HasSequence("PIMS_PROP_PROP_CLASSIFICATION_ID_SEQ")
.HasMin(1L)
.HasMax(2147483647L);
Expand Down Expand Up @@ -8099,6 +8209,15 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
modelBuilder.HasSequence("PIMS_PROPERTY_LEASE_ID_SEQ")
.HasMin(1L)
.HasMax(2147483647L);
modelBuilder.HasSequence("PIMS_PROPERTY_OPERATION_H_ID_SEQ")
.HasMin(1L)
.HasMax(2147483647L);
modelBuilder.HasSequence("PIMS_PROPERTY_OPERATION_ID_SEQ")
.HasMin(1L)
.HasMax(2147483647L);
modelBuilder.HasSequence("PIMS_PROPERTY_OPERATION_NO_SEQ")
.HasMin(1L)
.HasMax(2147483647L);
modelBuilder.HasSequence("PIMS_PROPERTY_ORGANIZATION_H_ID_SEQ")
.HasMin(1L)
.HasMax(2147483647L);
Expand Down
12 changes: 12 additions & 0 deletions source/backend/entities/ef/PimsProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ public partial class PimsProperty
[Column("IS_SENSITIVE")]
public bool IsSensitive { get; set; }

/// <summary>
/// If the property was the source of a subdivision operation or the target of a consolidation operation, the property is marked as retired.
/// </summary>
[Column("IS_RETIRED")]
public bool? IsRetired { get; set; }

/// <summary>
/// Is this property a provincial public highway?
/// </summary>
Expand Down Expand Up @@ -411,6 +417,12 @@ public partial class PimsProperty
[InverseProperty("Property")]
public virtual ICollection<PimsPropertyLease> PimsPropertyLeases { get; set; } = new List<PimsPropertyLease>();

[InverseProperty("DestinationProperty")]
public virtual ICollection<PimsPropertyOperation> PimsPropertyOperationDestinationProperties { get; set; } = new List<PimsPropertyOperation>();

[InverseProperty("SourceProperty")]
public virtual ICollection<PimsPropertyOperation> PimsPropertyOperationSourceProperties { get; set; } = new List<PimsPropertyOperation>();

[InverseProperty("Property")]
public virtual ICollection<PimsPropertyOrganization> PimsPropertyOrganizations { get; set; } = new List<PimsPropertyOrganization>();

Expand Down
24 changes: 0 additions & 24 deletions source/backend/entities/ef/PimsPropertyActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,30 +83,6 @@ public partial class PimsPropertyActivity
[StringLength(2000)]
public string RequestSource { get; set; }

/// <summary>
/// Subtotal of the management activity cost.
/// </summary>
[Column("PRETAX_AMT", TypeName = "money")]
public decimal? PretaxAmt { get; set; }

/// <summary>
/// GST on the management activity.
/// </summary>
[Column("GST_AMT", TypeName = "money")]
public decimal? GstAmt { get; set; }

/// <summary>
/// PST on the management activity.
/// </summary>
[Column("PST_AMT", TypeName = "money")]
public decimal? PstAmt { get; set; }

/// <summary>
/// Total cost of the management activity.
/// </summary>
[Column("TOTAL_AMT", TypeName = "money")]
public decimal? TotalAmt { get; set; }

/// <summary>
/// Indicates if the code is disabled.
/// </summary>
Expand Down
12 changes: 0 additions & 12 deletions source/backend/entities/ef/PimsPropertyActivityHist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,6 @@ public partial class PimsPropertyActivityHist
[StringLength(2000)]
public string RequestSource { get; set; }

[Column("PRETAX_AMT", TypeName = "money")]
public decimal? PretaxAmt { get; set; }

[Column("GST_AMT", TypeName = "money")]
public decimal? GstAmt { get; set; }

[Column("PST_AMT", TypeName = "money")]
public decimal? PstAmt { get; set; }

[Column("TOTAL_AMT", TypeName = "money")]
public decimal? TotalAmt { get; set; }

[Column("IS_DISABLED")]
public bool? IsDisabled { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions source/backend/entities/ef/PimsPropertyBoundaryVw.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ public partial class PimsPropertyBoundaryVw
[Column("IS_OTHER_INTEREST")]
public bool IsOtherInterest { get; set; }

[Column("IS_RETIRED")]
public bool? IsRetired { get; set; }

[Column("IS_VISIBLE_TO_OTHER_AGENCIES")]
public bool IsVisibleToOtherAgencies { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions source/backend/entities/ef/PimsPropertyHist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ public partial class PimsPropertyHist
[Column("IS_SENSITIVE")]
public bool IsSensitive { get; set; }

[Column("IS_RETIRED")]
public bool? IsRetired { get; set; }

[Column("IS_PROVINCIAL_PUBLIC_HWY")]
public bool? IsProvincialPublicHwy { get; set; }

Expand Down
3 changes: 3 additions & 0 deletions source/backend/entities/ef/PimsPropertyLocationVw.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ public partial class PimsPropertyLocationVw
[Column("IS_OTHER_INTEREST")]
public bool IsOtherInterest { get; set; }

[Column("IS_RETIRED")]
public bool? IsRetired { get; set; }

[Column("IS_VISIBLE_TO_OTHER_AGENCIES")]
public bool IsVisibleToOtherAgencies { get; set; }

Expand Down
Loading

0 comments on commit 1b949b6

Please sign in to comment.