Skip to content

Commit c36f73d

Browse files
authored
Merge pull request #695 from bcgov/ricander
Ricander
2 parents f459d8c + ba94892 commit c36f73d

13 files changed

+223
-142
lines changed

server/StrDss.Data/Entities/DssDbContext.cs

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public DssDbContext(DbContextOptions<DssDbContext> options)
3131

3232
public virtual DbSet<DssPhysicalAddress> DssPhysicalAddresses { get; set; }
3333

34+
public virtual DbSet<DssPlatformType> DssPlatformTypes { get; set; }
35+
3436
public virtual DbSet<DssPlatformVw> DssPlatformVws { get; set; }
3537

3638
public virtual DbSet<DssRentalListing> DssRentalListings { get; set; }
@@ -432,6 +434,9 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
432434
.HasMaxLength(100)
433435
.HasComment("A free form description of the economic region to which a Local Government Subdivision belongs")
434436
.HasColumnName("economic_region_dsc");
437+
entity.Property(e => e.IsActive)
438+
.HasComment("Indicates whether the ORGANIZATION is currently available for new associations")
439+
.HasColumnName("is_active");
435440
entity.Property(e => e.IsBusinessLicenceRequired)
436441
.HasComment("Indicates whether a LOCAL GOVERNMENT SUBDIVISION requires a business licence for Short Term Rental operation")
437442
.HasColumnName("is_business_licence_required");
@@ -446,7 +451,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
446451
.HasColumnName("is_str_prohibited");
447452
entity.Property(e => e.LocalGovernmentType)
448453
.HasMaxLength(50)
449-
.HasComment("A sub-type of local government organization used for sorting and grouping or members")
454+
.HasComment("A sub-type of local government organization used for sorting and grouping of members")
450455
.HasColumnName("local_government_type");
451456
entity.Property(e => e.ManagingOrganizationId)
452457
.HasComment("Self-referential hierarchical foreign key")
@@ -463,6 +468,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
463468
.HasMaxLength(25)
464469
.HasComment("Foreign key")
465470
.HasColumnName("organization_type");
471+
entity.Property(e => e.PlatformType)
472+
.HasMaxLength(25)
473+
.HasComment("Foreign key")
474+
.HasColumnName("platform_type");
466475
entity.Property(e => e.UpdDtm)
467476
.HasComment("Trigger-updated timestamp of last change")
468477
.HasColumnName("upd_dtm");
@@ -478,6 +487,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
478487
.HasForeignKey(d => d.OrganizationType)
479488
.OnDelete(DeleteBehavior.ClientSetNull)
480489
.HasConstraintName("dss_organization_fk_treated_as");
490+
491+
entity.HasOne(d => d.PlatformTypeNavigation).WithMany(p => p.DssOrganizations)
492+
.HasForeignKey(d => d.PlatformType)
493+
.HasConstraintName("dss_organization_fk_classified_as");
481494
});
482495

483496
modelBuilder.Entity<DssOrganizationContactPerson>(entity =>
@@ -660,12 +673,29 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
660673
.HasConstraintName("dss_physical_address_fk_replaced_by");
661674
});
662675

676+
modelBuilder.Entity<DssPlatformType>(entity =>
677+
{
678+
entity.HasKey(e => e.PlatformType).HasName("dss_platform_type_pk");
679+
680+
entity.ToTable("dss_platform_type", tb => tb.HasComment("A sub-type of rental platform organization used for sorting and grouping of members"));
681+
682+
entity.Property(e => e.PlatformType)
683+
.HasMaxLength(25)
684+
.HasComment("System-consistent code (e.g. Major/Minor)")
685+
.HasColumnName("platform_type");
686+
entity.Property(e => e.PlatformTypeNm)
687+
.HasMaxLength(250)
688+
.HasComment("Business term for the platform type (e.g. Major/Minor)")
689+
.HasColumnName("platform_type_nm");
690+
});
691+
663692
modelBuilder.Entity<DssPlatformVw>(entity =>
664693
{
665694
entity
666695
.HasNoKey()
667696
.ToView("dss_platform_vw");
668697

698+
entity.Property(e => e.IsActive).HasColumnName("is_active");
669699
entity.Property(e => e.ManagingOrganizationId).HasColumnName("managing_organization_id");
670700
entity.Property(e => e.OrganizationCd)
671701
.HasMaxLength(25)
@@ -677,6 +707,12 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
677707
entity.Property(e => e.OrganizationType)
678708
.HasMaxLength(25)
679709
.HasColumnName("organization_type");
710+
entity.Property(e => e.PlatformType)
711+
.HasMaxLength(25)
712+
.HasColumnName("platform_type");
713+
entity.Property(e => e.PlatformTypeNm)
714+
.HasMaxLength(250)
715+
.HasColumnName("platform_type_nm");
680716
entity.Property(e => e.PrimaryNoticeOfTakedownContactEmail)
681717
.HasMaxLength(320)
682718
.HasColumnName("primary_notice_of_takedown_contact_email");
@@ -1030,6 +1066,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
10301066
entity.Property(e => e.IsMatchVerified).HasColumnName("is_match_verified");
10311067
entity.Property(e => e.IsNew).HasColumnName("is_new");
10321068
entity.Property(e => e.IsPrincipalResidenceRequired).HasColumnName("is_principal_residence_required");
1069+
entity.Property(e => e.IsStrProhibited).HasColumnName("is_str_prohibited");
10331070
entity.Property(e => e.IsTakenDown).HasColumnName("is_taken_down");
10341071
entity.Property(e => e.LastActionDtm).HasColumnName("last_action_dtm");
10351072
entity.Property(e => e.LastActionNm)

server/StrDss.Data/Entities/DssEmailMessage.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,20 @@ public partial class DssEmailMessage
2828
/// </summary>
2929
public string MessageTemplateDsc { get; set; } = null!;
3030

31+
/// <summary>
32+
/// Indicates whether the user initiating the message should receive a copy of the email
33+
/// </summary>
34+
public bool IsSubmitterCcRequired { get; set; }
35+
3136
/// <summary>
3237
/// Indicates whether the the property host has already been contacted by external means
3338
/// </summary>
3439
public bool? IsHostContactedExternally { get; set; }
3540

3641
/// <summary>
37-
/// Indicates whether the user initiating the message should receive a copy of the email
42+
/// Indicates whether message body should include text a block of detail text that is standard for the message type
3843
/// </summary>
39-
public bool IsSubmitterCcRequired { get; set; }
44+
public bool? IsWithStandardDetail { get; set; }
4045

4146
/// <summary>
4247
/// A phone number associated with a Local Government contact
@@ -73,6 +78,16 @@ public partial class DssEmailMessage
7378
/// </summary>
7479
public string? LgStrBylawUrl { get; set; }
7580

81+
/// <summary>
82+
/// Free form text that should be included in the message body
83+
/// </summary>
84+
public string? CustomDetailTxt { get; set; }
85+
86+
/// <summary>
87+
/// Foreign key
88+
/// </summary>
89+
public long? ConcernedWithRentalListingId { get; set; }
90+
7691
/// <summary>
7792
/// Foreign key
7893
/// </summary>
@@ -113,21 +128,6 @@ public partial class DssEmailMessage
113128
/// </summary>
114129
public Guid? UpdUserGuid { get; set; }
115130

116-
/// <summary>
117-
/// Foreign key
118-
/// </summary>
119-
public long? ConcernedWithRentalListingId { get; set; }
120-
121-
/// <summary>
122-
/// Indicates whether message body should include text a block of detail text that is standard for the message type
123-
/// </summary>
124-
public bool? IsWithStandardDetail { get; set; }
125-
126-
/// <summary>
127-
/// Free form text that should be included in the message body
128-
/// </summary>
129-
public string? CustomDetailTxt { get; set; }
130-
131131
public virtual DssUserIdentity? AffectedByUserIdentity { get; set; }
132132

133133
public virtual DssEmailMessage? BatchingEmailMessage { get; set; }

server/StrDss.Data/Entities/DssOrganization.cs

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,29 @@ public partial class DssOrganization
3030
public string OrganizationNm { get; set; } = null!;
3131

3232
/// <summary>
33-
/// the multipolygon shape identifying the boundaries of a local government subdivision
33+
/// A sub-type of local government organization used for sorting and grouping of members
3434
/// </summary>
35-
public Geometry? AreaGeometry { get; set; }
35+
public string? LocalGovernmentType { get; set; }
3636

3737
/// <summary>
38-
/// Self-referential hierarchical foreign key
38+
/// A free form description of the economic region to which a Local Government Subdivision belongs
3939
/// </summary>
40-
public long? ManagingOrganizationId { get; set; }
40+
public string? EconomicRegionDsc { get; set; }
4141

4242
/// <summary>
43-
/// Trigger-updated timestamp of last change
43+
/// Indicates whether the ORGANIZATION is currently available for new associations
4444
/// </summary>
45-
public DateTime UpdDtm { get; set; }
45+
public bool? IsActive { get; set; }
4646

4747
/// <summary>
48-
/// The globally unique identifier (assigned by the identity provider) for the most recent user to record a change
48+
/// Indicates whether a LOCAL GOVERNMENT ORGANIZATION participates in Short Term Rental Data Sharing
4949
/// </summary>
50-
public Guid? UpdUserGuid { get; set; }
50+
public bool? IsLgParticipating { get; set; }
5151

5252
/// <summary>
53-
/// Indicates whether a LOCAL GOVERNMENT ORGANIZATION participates in Short Term Rental Data Sharing
53+
/// Indicates whether a LOCAL GOVERNMENT ORGANIZATION entirely prohibits short term housing rentals
5454
/// </summary>
55-
public bool? IsLgParticipating { get; set; }
55+
public bool? IsStrProhibited { get; set; }
5656

5757
/// <summary>
5858
/// Indicates whether a LOCAL GOVERNMENT SUBDIVISION is subject to Provincial Principal Residence Short Term Rental restrictions
@@ -65,19 +65,29 @@ public partial class DssOrganization
6565
public bool? IsBusinessLicenceRequired { get; set; }
6666

6767
/// <summary>
68-
/// A free form description of the economic region to which a Local Government Subdivision belongs
68+
/// the multipolygon shape identifying the boundaries of a local government subdivision
6969
/// </summary>
70-
public string? EconomicRegionDsc { get; set; }
70+
public Geometry? AreaGeometry { get; set; }
7171

7272
/// <summary>
73-
/// A sub-type of local government organization used for sorting and grouping or members
73+
/// Self-referential hierarchical foreign key
7474
/// </summary>
75-
public string? LocalGovernmentType { get; set; }
75+
public long? ManagingOrganizationId { get; set; }
7676

7777
/// <summary>
78-
/// Indicates whether a LOCAL GOVERNMENT ORGANIZATION entirely prohibits short term housing rentals
78+
/// Foreign key
7979
/// </summary>
80-
public bool? IsStrProhibited { get; set; }
80+
public string? PlatformType { get; set; }
81+
82+
/// <summary>
83+
/// Trigger-updated timestamp of last change
84+
/// </summary>
85+
public DateTime UpdDtm { get; set; }
86+
87+
/// <summary>
88+
/// The globally unique identifier (assigned by the identity provider) for the most recent user to record a change
89+
/// </summary>
90+
public Guid? UpdUserGuid { get; set; }
8191

8292
public virtual ICollection<DssBusinessLicence> DssBusinessLicences { get; set; } = new List<DssBusinessLicence>();
8393

@@ -104,4 +114,6 @@ public partial class DssOrganization
104114
public virtual DssOrganization? ManagingOrganization { get; set; }
105115

106116
public virtual DssOrganizationType OrganizationTypeNavigation { get; set; } = null!;
117+
118+
public virtual DssPlatformType? PlatformTypeNavigation { get; set; }
107119
}

server/StrDss.Data/Entities/DssOrganizationContactPerson.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ public partial class DssOrganizationContactPerson
1313
/// </summary>
1414
public long OrganizationContactPersonId { get; set; }
1515

16+
/// <summary>
17+
/// E-mail address given for the contact by the organization
18+
/// </summary>
19+
public string EmailAddressDsc { get; set; } = null!;
20+
1621
/// <summary>
1722
/// Indicates whether the contact should receive all communications directed at the organization
1823
/// </summary>
@@ -34,14 +39,14 @@ public partial class DssOrganizationContactPerson
3439
public string? PhoneNo { get; set; }
3540

3641
/// <summary>
37-
/// E-mail address given for the contact by the organization
42+
/// Foreign key
3843
/// </summary>
39-
public string EmailAddressDsc { get; set; } = null!;
44+
public long ContactedThroughOrganizationId { get; set; }
4045

4146
/// <summary>
4247
/// Foreign key
4348
/// </summary>
44-
public long ContactedThroughOrganizationId { get; set; }
49+
public string? EmailMessageType { get; set; }
4550

4651
/// <summary>
4752
/// Trigger-updated timestamp of last change
@@ -53,11 +58,6 @@ public partial class DssOrganizationContactPerson
5358
/// </summary>
5459
public Guid? UpdUserGuid { get; set; }
5560

56-
/// <summary>
57-
/// Foreign key
58-
/// </summary>
59-
public string? EmailMessageType { get; set; }
60-
6161
public virtual DssOrganization ContactedThroughOrganization { get; set; } = null!;
6262

6363
public virtual DssEmailMessageType? EmailMessageTypeNavigation { get; set; }

server/StrDss.Data/Entities/DssPhysicalAddress.cs

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -34,41 +34,6 @@ public partial class DssPhysicalAddress
3434
/// </summary>
3535
public short? MatchScoreAmt { get; set; }
3636

37-
/// <summary>
38-
/// The siteID returned by the address match
39-
/// </summary>
40-
public string? SiteNo { get; set; }
41-
42-
/// <summary>
43-
/// The blockID returned by the address match
44-
/// </summary>
45-
public string? BlockNo { get; set; }
46-
47-
/// <summary>
48-
/// The computed location point of the matched address
49-
/// </summary>
50-
public Geometry? LocationGeometry { get; set; }
51-
52-
/// <summary>
53-
/// Indicates whether the address has been identified as exempt from Short Term Rental regulations
54-
/// </summary>
55-
public bool? IsExempt { get; set; }
56-
57-
/// <summary>
58-
/// Foreign key
59-
/// </summary>
60-
public long? ContainingOrganizationId { get; set; }
61-
62-
/// <summary>
63-
/// Trigger-updated timestamp of last change
64-
/// </summary>
65-
public DateTime UpdDtm { get; set; }
66-
67-
/// <summary>
68-
/// The globally unique identifier (assigned by the identity provider) for the most recent user to record a change
69-
/// </summary>
70-
public Guid? UpdUserGuid { get; set; }
71-
7237
/// <summary>
7338
/// The unitNumber (suite) returned by the address match (e.g. 100)
7439
/// </summary>
@@ -110,15 +75,35 @@ public partial class DssPhysicalAddress
11075
public string? ProvinceCd { get; set; }
11176

11277
/// <summary>
113-
/// Foreign key
78+
/// The siteID returned by the address match
11479
/// </summary>
115-
public long? ReplacingPhysicalAddressId { get; set; }
80+
public string? SiteNo { get; set; }
81+
82+
/// <summary>
83+
/// The blockID returned by the address match
84+
/// </summary>
85+
public string? BlockNo { get; set; }
86+
87+
/// <summary>
88+
/// The computed location point of the matched address
89+
/// </summary>
90+
public Geometry? LocationGeometry { get; set; }
91+
92+
/// <summary>
93+
/// Indicates whether the address has been identified as exempt from Short Term Rental regulations
94+
/// </summary>
95+
public bool? IsExempt { get; set; }
11696

11797
/// <summary>
11898
/// Indicates whether the matched address has been verified as correct for the listing by the responsible authorities
11999
/// </summary>
120100
public bool? IsMatchVerified { get; set; }
121101

102+
/// <summary>
103+
/// Indicates whether the original address has received a different property address from the platform in the last reporting period
104+
/// </summary>
105+
public bool? IsChangedOriginalAddress { get; set; }
106+
122107
/// <summary>
123108
/// Indicates whether the matched address has been manually changed to one that is verified as correct for the listing
124109
/// </summary>
@@ -130,9 +115,24 @@ public partial class DssPhysicalAddress
130115
public bool? IsSystemProcessing { get; set; }
131116

132117
/// <summary>
133-
/// Indicates whether the original address has received a different property address from the platform in the last reporting period
118+
/// Foreign key
134119
/// </summary>
135-
public bool? IsChangedOriginalAddress { get; set; }
120+
public long? ContainingOrganizationId { get; set; }
121+
122+
/// <summary>
123+
/// Foreign key
124+
/// </summary>
125+
public long? ReplacingPhysicalAddressId { get; set; }
126+
127+
/// <summary>
128+
/// Trigger-updated timestamp of last change
129+
/// </summary>
130+
public DateTime UpdDtm { get; set; }
131+
132+
/// <summary>
133+
/// The globally unique identifier (assigned by the identity provider) for the most recent user to record a change
134+
/// </summary>
135+
public Guid? UpdUserGuid { get; set; }
136136

137137
public virtual DssOrganization? ContainingOrganization { get; set; }
138138

0 commit comments

Comments
 (0)