-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #550 from shaangill025/fix_25480
API - Host Strata Hotel Category
- Loading branch information
Showing
10 changed files
with
66 additions
and
11 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
strr-api/migrations/versions/20250204_1137_7e9fccbeb3ed_.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"""empty message | ||
Revision ID: 7e9fccbeb3ed | ||
Revises: 842bb132abc7 | ||
Create Date: 2025-02-04 11:37:53.005700 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '7e9fccbeb3ed' | ||
down_revision = '842bb132abc7' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
stratahotelcategory = postgresql.ENUM('FULL_SERVICE', 'MULTI_UNIT_NON_PR', 'POST_DECEMBER_2023', name='stratahotelcategory') | ||
stratahotelcategory.create(op.get_bind(), checkfirst=True) | ||
|
||
def upgrade(): | ||
with op.batch_alter_table('rental_properties', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('strata_hotel_category', stratahotelcategory, nullable=True)) | ||
batch_op.create_index(batch_op.f('ix_rental_properties_strata_hotel_category'), ['strata_hotel_category'], unique=False) | ||
|
||
with op.batch_alter_table('rental_properties_history', schema=None) as batch_op: | ||
batch_op.add_column(sa.Column('strata_hotel_category', stratahotelcategory, autoincrement=False, nullable=True)) | ||
batch_op.create_index(batch_op.f('ix_rental_properties_history_strata_hotel_category'), ['strata_hotel_category'], unique=False) | ||
|
||
|
||
def downgrade(): | ||
with op.batch_alter_table('rental_properties', schema=None) as batch_op: | ||
batch_op.drop_index(batch_op.f('ix_rental_properties_strata_hotel_category')) | ||
batch_op.drop_column('strata_hotel_category') | ||
|
||
with op.batch_alter_table('rental_properties_history', schema=None) as batch_op: | ||
batch_op.drop_index(batch_op.f('ix_rental_properties_history_strata_hotel_category')) | ||
batch_op.drop_column('strata_hotel_category') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ | |
], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\n \"header\": {\n \"paymentMethod\": \"DIRECT_PAY\"\n },\n \"registration\": {\n \"registrationType\": \"HOST\",\n \"primaryContact\": {\n \"firstName\": \"The\",\n \"middleName\": \"First\",\n \"lastName\": \"Guy\",\n \"dateOfBirth\": \"1986-10-23\",\n \"preferredName\": \"Mickey\",\n \"phoneCountryCode\": \"001\",\n \"phoneNumber\": \"604-999-9999\",\n \"extension\": \"x64\",\n \"faxNumber\": \"604-777-7777\",\n \"emailAddress\": \"[email protected]\",\n \"socialInsuranceNumber\":\"123 222 333\",\n \"mailingAddress\": {\n \"country\": \"CA\",\n \"address\": \"12766 227st\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 6K6\"\n }\n },\n \"secondaryContact\": {\n \"firstName\": \"The\",\n \"middleName\": \"Other\",\n \"lastName\": \"Guy\",\n \"dateOfBirth\": \"1986-10-23\",\n \"preferredName\": \"Mouse\",\n \"phoneCountryCode\": \"001\",\n \"phoneNumber\": \"604-888-8888\",\n \"extension\": \"\",\n \"faxNumber\": \"\",\n \"emailAddress\": \"[email protected]\",\n \"mailingAddress\": {\n \"country\": \"CA\",\n \"address\": \"12766 227st\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 6K6\"\n }\n },\n \"unitAddress\": {\n \"nickname\": \"My Rental Property\",\n \"country\": \"CA\",\n \"unitNumber\": \"\",\n \"streetNumber\": \"12166\",\n \"streetName\": \"GREENWELL ST MAPLE RIDGE\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 7N1\"\n },\n \"strRequirements\": {\n \"isBusinessLicenceRequired\": false,\n \"isPrincipalResidenceRequired\": true,\n \"isStrProhibited\": false,\n \"isStraaExempt\": null,\n \"organizationNm\": \"City of Maple Ridge\"\n },\n \"unitDetails\": {\n \"parcelIdentifier\": \"000-460-991\",\n \"businessLicense\": \"7777777\",\n \"businessLicenseExpiryDate\": \"2025-01-01\",\n \"propertyType\": \"SINGLE_FAMILY_HOME\",\n \"ownershipType\": \"OWN\",\n \"rentalUnitSpaceType\": \"ENTIRE_HOME\",\n \"hostResidence\": \"SAME_UNIT\",\n \"isUnitOnPrincipalResidenceProperty\": true,\n \"numberOfRoomsForRent\": 1,\n \"blExemptReason\": \"This short-term rental does not offer bookings of under 30 days\",\n \"prExemptReason\": \"FRACTIONAL_OWNERSHIP\"\n },\n \"listingDetails\": [\n {\n \"url\": \"https://www.airbnb.ca/rooms/26359027\"\n }\n ],\n \"documents\": [\n {\n \"fileName\": \"Drivers License\",\n \"fileType\": \"pdf\",\n \"fileKey\": \"a1234\",\n \"documentType\": \"BC_DRIVERS_LICENSE\"\n }\n ]\n }\n}", | ||
"raw": "{\n \"header\": {\n \"paymentMethod\": \"DIRECT_PAY\"\n },\n \"registration\": {\n \"registrationType\": \"HOST\",\n \"primaryContact\": {\n \"firstName\": \"The\",\n \"middleName\": \"First\",\n \"lastName\": \"Guy\",\n \"dateOfBirth\": \"1986-10-23\",\n \"preferredName\": \"Mickey\",\n \"phoneCountryCode\": \"001\",\n \"phoneNumber\": \"604-999-9999\",\n \"extension\": \"x64\",\n \"faxNumber\": \"604-777-7777\",\n \"emailAddress\": \"[email protected]\",\n \"socialInsuranceNumber\":\"123 222 333\",\n \"mailingAddress\": {\n \"country\": \"CA\",\n \"address\": \"12766 227st\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 6K6\"\n }\n },\n \"secondaryContact\": {\n \"firstName\": \"The\",\n \"middleName\": \"Other\",\n \"lastName\": \"Guy\",\n \"dateOfBirth\": \"1986-10-23\",\n \"preferredName\": \"Mouse\",\n \"phoneCountryCode\": \"001\",\n \"phoneNumber\": \"604-888-8888\",\n \"extension\": \"\",\n \"faxNumber\": \"\",\n \"emailAddress\": \"[email protected]\",\n \"mailingAddress\": {\n \"country\": \"CA\",\n \"address\": \"12766 227st\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 6K6\"\n }\n },\n \"unitAddress\": {\n \"nickname\": \"My Rental Property\",\n \"country\": \"CA\",\n \"unitNumber\": \"\",\n \"streetNumber\": \"12166\",\n \"streetName\": \"GREENWELL ST MAPLE RIDGE\",\n \"addressLineTwo\": \"\",\n \"city\": \"MAPLE RIDGE\",\n \"province\": \"BC\",\n \"postalCode\": \"V2X 7N1\"\n },\n \"strRequirements\": {\n \"isBusinessLicenceRequired\": false,\n \"isPrincipalResidenceRequired\": true,\n \"isStrProhibited\": false,\n \"isStraaExempt\": null,\n \"organizationNm\": \"City of Maple Ridge\"\n },\n \"unitDetails\": {\n \"parcelIdentifier\": \"000-460-991\",\n \"businessLicense\": \"7777777\",\n \"businessLicenseExpiryDate\": \"2025-01-01\",\n \"propertyType\": \"SINGLE_FAMILY_HOME\",\n \"ownershipType\": \"OWN\",\n \"rentalUnitSpaceType\": \"ENTIRE_HOME\",\n \"hostResidence\": \"SAME_UNIT\",\n \"isUnitOnPrincipalResidenceProperty\": true,\n \"numberOfRoomsForRent\": 1,\n \"strataHotelCategory\": \"MULTI_UNIT_NON_PR\",\n \"blExemptReason\": \"This short-term rental does not offer bookings of under 30 days\",\n \"prExemptReason\": \"FRACTIONAL_OWNERSHIP\"\n },\n \"listingDetails\": [\n {\n \"url\": \"https://www.airbnb.ca/rooms/26359027\"\n }\n ],\n \"documents\": [\n {\n \"fileName\": \"Drivers License\",\n \"fileType\": \"pdf\",\n \"fileKey\": \"a1234\",\n \"documentType\": \"BC_DRIVERS_LICENSE\"\n }\n ]\n }\n}", | ||
"options": { | ||
"raw": { | ||
"language": "json" | ||
|