Skip to content

Commit

Permalink
Merge branch 'bcgov:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
larsenle authored Oct 15, 2024
2 parents d11fc07 + eaf050b commit ef3c3a7
Show file tree
Hide file tree
Showing 15 changed files with 186 additions and 155 deletions.
12 changes: 6 additions & 6 deletions server/StrDss.Api/Controllers/OrganizationsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ public async Task<ActionResult<StrRequirementsDto>> GetStrRequirements(double lo
}


[ApiAuthorize(Permissions.PlatformRead)] //TODO: use platform_read permission when it's ready in the database
[ApiAuthorize(Permissions.PlatformRead)]
[HttpGet("platforms")]
public async Task<ActionResult<List<PlatformViewDto>>> GetPlatforms(int pageSize = 10, int pageNumber = 1, string orderBy = "OrganizationNm", string direction = "asc")
{
var platforms = await _orgService.GetPlatforms(pageSize, pageNumber, orderBy, direction);
return Ok(platforms);
}

[ApiAuthorize(Permissions.PlatformRead)] //TODO: use platform_read permission when it's ready in the database
[ApiAuthorize(Permissions.PlatformRead)]
[HttpGet("platforms/{id}")]
public async Task<ActionResult<PlatformViewDto>> GetPlatform(long id)
{
Expand All @@ -101,7 +101,7 @@ public async Task<ActionResult<PlatformViewDto>> GetPlatform(long id)
return Ok(platform);
}

[ApiAuthorize(Permissions.PlatformWrite)] //todo: use platform_write permission when it's ready in the database
[ApiAuthorize(Permissions.PlatformWrite)]
[HttpPost("platforms", Name = "CreatePlatform")]
public async Task<ActionResult> CreatePlatform(PlatformCreateDto dto)
{
Expand All @@ -115,7 +115,7 @@ public async Task<ActionResult> CreatePlatform(PlatformCreateDto dto)
return Ok(id);
}

[ApiAuthorize(Permissions.PlatformWrite)] //todo: use platform_write permission when it's ready in the database
[ApiAuthorize(Permissions.PlatformWrite)]
[HttpPut("platforms/{id}", Name = "UpdatePlatform")]
public async Task<ActionResult> UpdatePlatform(PlatformUpdateDto dto, long id)
{
Expand All @@ -131,7 +131,7 @@ public async Task<ActionResult> UpdatePlatform(PlatformUpdateDto dto, long id)
return Ok();
}

[ApiAuthorize(Permissions.PlatformWrite)] //todo: use platform_write permission when it's ready in the database
[ApiAuthorize(Permissions.PlatformWrite)]
[HttpPost("platforms/subsidiaries", Name = "CreatePlatformSub")]
public async Task<ActionResult> CreatePlatformSub(PlatformSubCreateDto dto)
{
Expand All @@ -145,7 +145,7 @@ public async Task<ActionResult> CreatePlatformSub(PlatformSubCreateDto dto)
return Ok(id);
}

[ApiAuthorize(Permissions.PlatformWrite)] //todo: use platform_write permission when it's ready in the database
[ApiAuthorize(Permissions.PlatformWrite)]
[HttpPut("platforms/subsidiaries/{id}", Name = "UpdatePlatformSub")]
public async Task<ActionResult> UpdatePlatformSub(PlatformSubUpdateDto dto, long id)
{
Expand Down
2 changes: 2 additions & 0 deletions server/StrDss.Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public static class PlatformFields
public const string PrimaryTakedownRequestContactEmail = "PrimaryTakedownRequestContactEmail";
public const string SecondaryNoticeOfTakedownContactEmail = "SecondaryNoticeOfTakedownContactEmail";
public const string SecondaryTakedownRequestContactEmail = "SecondaryTakedownRequestContactEmail";
public const string PlatformType = "PlatformType";
}

public static class RentalListingExport
Expand Down Expand Up @@ -235,6 +236,7 @@ public static class FieldTypes
public static class CodeSet
{
public const string LicenceStatus = "Licence Status";
public const string PlatformTypes = "Platform Types";
}

public static class StrDssIdProviders
Expand Down
1 change: 0 additions & 1 deletion server/StrDss.Data/Entities/DssDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.IsMatchVerified).HasColumnName("is_match_verified");
entity.Property(e => e.IsNew).HasColumnName("is_new");
entity.Property(e => e.IsPrincipalResidenceRequired).HasColumnName("is_principal_residence_required");
entity.Property(e => e.IsStrProhibited).HasColumnName("is_str_prohibited");
entity.Property(e => e.IsTakenDown).HasColumnName("is_taken_down");
entity.Property(e => e.LastActionDtm).HasColumnName("last_action_dtm");
entity.Property(e => e.LastActionNm)
Expand Down
34 changes: 17 additions & 17 deletions server/StrDss.Data/Entities/DssEmailMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,15 @@ public partial class DssEmailMessage
/// </summary>
public string MessageTemplateDsc { get; set; } = null!;

/// <summary>
/// Indicates whether the user initiating the message should receive a copy of the email
/// </summary>
public bool IsSubmitterCcRequired { get; set; }

/// <summary>
/// Indicates whether the the property host has already been contacted by external means
/// </summary>
public bool? IsHostContactedExternally { get; set; }

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

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

/// <summary>
/// Free form text that should be included in the message body
/// </summary>
public string? CustomDetailTxt { get; set; }

/// <summary>
/// Foreign key
/// </summary>
public long? ConcernedWithRentalListingId { get; set; }

/// <summary>
/// Foreign key
/// </summary>
Expand Down Expand Up @@ -128,6 +113,21 @@ public partial class DssEmailMessage
/// </summary>
public Guid? UpdUserGuid { get; set; }

/// <summary>
/// Foreign key
/// </summary>
public long? ConcernedWithRentalListingId { get; set; }

/// <summary>
/// Indicates whether message body should include text a block of detail text that is standard for the message type
/// </summary>
public bool? IsWithStandardDetail { get; set; }

/// <summary>
/// Free form text that should be included in the message body
/// </summary>
public string? CustomDetailTxt { get; set; }

public virtual DssUserIdentity? AffectedByUserIdentity { get; set; }

public virtual DssEmailMessage? BatchingEmailMessage { get; set; }
Expand Down
40 changes: 20 additions & 20 deletions server/StrDss.Data/Entities/DssOrganization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,29 @@ public partial class DssOrganization
public string OrganizationNm { get; set; } = null!;

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

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

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

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

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

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

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

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

/// <summary>
/// Foreign key
/// Indicates whether a LOCAL GOVERNMENT ORGANIZATION entirely prohibits short term housing rentals
/// </summary>
public string? PlatformType { get; set; }
public bool? IsStrProhibited { get; set; }

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

/// <summary>
/// The globally unique identifier (assigned by the identity provider) for the most recent user to record a change
/// Foreign key
/// </summary>
public Guid? UpdUserGuid { get; set; }
public string? PlatformType { get; set; }

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

Expand Down
16 changes: 8 additions & 8 deletions server/StrDss.Data/Entities/DssOrganizationContactPerson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ public partial class DssOrganizationContactPerson
/// </summary>
public long OrganizationContactPersonId { get; set; }

/// <summary>
/// E-mail address given for the contact by the organization
/// </summary>
public string EmailAddressDsc { get; set; } = null!;

/// <summary>
/// Indicates whether the contact should receive all communications directed at the organization
/// </summary>
Expand All @@ -39,14 +34,14 @@ public partial class DssOrganizationContactPerson
public string? PhoneNo { get; set; }

/// <summary>
/// Foreign key
/// E-mail address given for the contact by the organization
/// </summary>
public long ContactedThroughOrganizationId { get; set; }
public string EmailAddressDsc { get; set; } = null!;

/// <summary>
/// Foreign key
/// </summary>
public string? EmailMessageType { get; set; }
public long ContactedThroughOrganizationId { get; set; }

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

/// <summary>
/// Foreign key
/// </summary>
public string? EmailMessageType { get; set; }

public virtual DssOrganization ContactedThroughOrganization { get; set; } = null!;

public virtual DssEmailMessageType? EmailMessageTypeNavigation { get; set; }
Expand Down
78 changes: 39 additions & 39 deletions server/StrDss.Data/Entities/DssPhysicalAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,41 @@ public partial class DssPhysicalAddress
/// </summary>
public short? MatchScoreAmt { get; set; }

/// <summary>
/// The siteID returned by the address match
/// </summary>
public string? SiteNo { get; set; }

/// <summary>
/// The blockID returned by the address match
/// </summary>
public string? BlockNo { get; set; }

/// <summary>
/// The computed location point of the matched address
/// </summary>
public Geometry? LocationGeometry { get; set; }

/// <summary>
/// Indicates whether the address has been identified as exempt from Short Term Rental regulations
/// </summary>
public bool? IsExempt { get; set; }

/// <summary>
/// Foreign key
/// </summary>
public long? ContainingOrganizationId { get; set; }

/// <summary>
/// Trigger-updated timestamp of last change
/// </summary>
public DateTime UpdDtm { get; set; }

/// <summary>
/// The globally unique identifier (assigned by the identity provider) for the most recent user to record a change
/// </summary>
public Guid? UpdUserGuid { get; set; }

/// <summary>
/// The unitNumber (suite) returned by the address match (e.g. 100)
/// </summary>
Expand Down Expand Up @@ -75,35 +110,15 @@ public partial class DssPhysicalAddress
public string? ProvinceCd { get; set; }

/// <summary>
/// The siteID returned by the address match
/// </summary>
public string? SiteNo { get; set; }

/// <summary>
/// The blockID returned by the address match
/// </summary>
public string? BlockNo { get; set; }

/// <summary>
/// The computed location point of the matched address
/// </summary>
public Geometry? LocationGeometry { get; set; }

/// <summary>
/// Indicates whether the address has been identified as exempt from Short Term Rental regulations
/// Foreign key
/// </summary>
public bool? IsExempt { get; set; }
public long? ReplacingPhysicalAddressId { get; set; }

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

/// <summary>
/// Indicates whether the original address has received a different property address from the platform in the last reporting period
/// </summary>
public bool? IsChangedOriginalAddress { get; set; }

/// <summary>
/// Indicates whether the matched address has been manually changed to one that is verified as correct for the listing
/// </summary>
Expand All @@ -115,24 +130,9 @@ public partial class DssPhysicalAddress
public bool? IsSystemProcessing { get; set; }

/// <summary>
/// Foreign key
/// </summary>
public long? ContainingOrganizationId { get; set; }

/// <summary>
/// Foreign key
/// </summary>
public long? ReplacingPhysicalAddressId { get; set; }

/// <summary>
/// Trigger-updated timestamp of last change
/// </summary>
public DateTime UpdDtm { get; set; }

/// <summary>
/// The globally unique identifier (assigned by the identity provider) for the most recent user to record a change
/// Indicates whether the original address has received a different property address from the platform in the last reporting period
/// </summary>
public Guid? UpdUserGuid { get; set; }
public bool? IsChangedOriginalAddress { get; set; }

public virtual DssOrganization? ContainingOrganization { get; set; }

Expand Down
Loading

0 comments on commit ef3c3a7

Please sign in to comment.