diff --git a/bc_obps/Makefile b/bc_obps/Makefile index 3f3941d667..895300026d 100644 --- a/bc_obps/Makefile +++ b/bc_obps/Makefile @@ -92,6 +92,11 @@ superuser: ## create a superuser superuser: $(POETRY_RUN) python $(MANAGE_PY) create_superuser +loadfixtures_v1: ## add all registration v1 fixture files to the db +loadfixtures_v1: + $(POETRY_RUN) python $(MANAGE_PY) load_fixtures_v1 $(ARGS) + $(POETRY_RUN) python $(MANAGE_PY) load_reporting_fixtures $(ARGS) + loadfixtures: ## add all registration fixture files to the db loadfixtures: $(POETRY_RUN) python $(MANAGE_PY) load_fixtures $(ARGS) diff --git a/bc_obps/common/management/commands/load_fixtures.py b/bc_obps/common/management/commands/load_fixtures.py index 703960fd19..6a9b1ab9cf 100644 --- a/bc_obps/common/management/commands/load_fixtures.py +++ b/bc_obps/common/management/commands/load_fixtures.py @@ -44,15 +44,19 @@ def handle(self, *args, **options): f'{fixture_base_dir}/user_operator.json', ], "admin-industry_user": [ - fixture.replace('user_operator.json', 'admin/user_operator.json') - if 'user_operator.json' in fixture - else fixture + ( + fixture.replace('user_operator.json', 'admin/user_operator.json') + if 'user_operator.json' in fixture + else fixture + ) for fixture in fixtures_base ], "admin-industry_user_operator": [ - fixture.replace('user_operator.json', 'admin/user_operator_approved.json') - if 'user_operator.json' in fixture - else fixture + ( + fixture.replace('user_operator.json', 'admin/user_operator_approved.json') + if 'user_operator.json' in fixture + else fixture + ) for fixture in fixtures_base ], # Add more workflows here diff --git a/bc_obps/common/management/commands/load_fixtures_v1.py b/bc_obps/common/management/commands/load_fixtures_v1.py new file mode 100644 index 0000000000..0a1e734360 --- /dev/null +++ b/bc_obps/common/management/commands/load_fixtures_v1.py @@ -0,0 +1,67 @@ +from django.core.management.base import BaseCommand +from django.core.management import call_command + + +class Command(BaseCommand): + help = 'Load fixtures for specified workflow or all fixtures if no argument provided' + + def add_arguments(self, parser): + parser.add_argument('workflow', nargs='?', type=str, help='Name of the workflow') + + def handle(self, *args, **options): + fixture_base_dir = 'registration/fixtures/mock/v1' + fixtures_base = [ # Order of fixtures is important + f'{fixture_base_dir}/address.json', + f'{fixture_base_dir}/user.json', + f'{fixture_base_dir}/contact.json', + f'{fixture_base_dir}/bc_obps_regulated_operation.json', + f'{fixture_base_dir}/bc_greenhouse_gas_id.json', + f'{fixture_base_dir}/operator.json', + f'{fixture_base_dir}/operation.json', + f'{fixture_base_dir}/multiple_operator.json', + f'{fixture_base_dir}/document.json', + f'{fixture_base_dir}/user_operator.json', + f'{fixture_base_dir}/parent_operator.json', + f'{fixture_base_dir}/partner_operator.json', + ] + + workflow_fixtures = { + "cas_admin": [ + f'{fixture_base_dir}/address.json', + f'{fixture_base_dir}/user.json', + f'{fixture_base_dir}/contact.json', + f'{fixture_base_dir}/bc_obps_regulated_operation.json', + f'{fixture_base_dir}/bc_greenhouse_gas_id.json', + f'{fixture_base_dir}/operator.json', + f'{fixture_base_dir}/operation.json', + f'{fixture_base_dir}/user_operator.json', + ], + "admin-industry_user": [ + ( + fixture.replace('user_operator.json', 'admin/user_operator.json') + if 'user_operator.json' in fixture + else fixture + ) + for fixture in fixtures_base + ], + "admin-industry_user_operator": [ + ( + fixture.replace('user_operator.json', 'admin/user_operator_approved.json') + if 'user_operator.json' in fixture + else fixture + ) + for fixture in fixtures_base + ], + # Add more workflows here + } + + if 'workflow' in options and options['workflow'] in workflow_fixtures: + fixtures = workflow_fixtures[options['workflow']] + else: + # If no workflow specified, load all fixtures + + fixtures = fixtures_base + + for fixture in fixtures: + self.stdout.write(self.style.SUCCESS(f"Loading: {fixture}")) + call_command('loaddata', fixture) diff --git a/bc_obps/registration/api/v1/e2e_test_setup.py b/bc_obps/registration/api/v1/e2e_test_setup.py index 85a4eacf55..4951a41153 100644 --- a/bc_obps/registration/api/v1/e2e_test_setup.py +++ b/bc_obps/registration/api/v1/e2e_test_setup.py @@ -24,10 +24,10 @@ def v1_setup( call_command('truncate_dev_data_tables') return HttpResponse("Test setup complete.", status=200) if load_only: # only load the data - call_command('load_fixtures', workflow) + call_command('load_fixtures_v1', workflow) return HttpResponse("Test setup complete.", status=200) call_command('truncate_dev_data_tables') - call_command('load_fixtures', workflow) + call_command('load_fixtures_v1', workflow) return HttpResponse("Test setup complete.", status=200) except Exception as e: return HttpResponse(f"Test setup failed. Reason:{e}", status=500) diff --git a/bc_obps/registration/fixtures/mock/operator.json b/bc_obps/registration/fixtures/mock/operator.json index 6147b25e4f..c461850150 100644 --- a/bc_obps/registration/fixtures/mock/operator.json +++ b/bc_obps/registration/fixtures/mock/operator.json @@ -3,20 +3,13 @@ "model": "registration.operator", "pk": "685d581b-5698-411f-ae00-de1d97334a71", "fields": { - "legal_name": "Operator 1 Legal Name", - "trade_name": "Operator 1 Trade Name", + "legal_name": "Alpha Enterprises", "cra_business_number": 123456789, "bc_corporate_registry_number": "abc1234567", "business_structure": "Sole Proprietorship", "physical_address": 3, - "mailing_address": 4, - "website": "http://www.example.com", - "documents": [], - "contacts": [], - "status": "Draft", - "is_new": true, - "verified_at": null, - "verified_by": null + "status": "Approved", + "is_new": false } }, { diff --git a/bc_obps/registration/fixtures/mock/v1/address.json b/bc_obps/registration/fixtures/mock/v1/address.json new file mode 100644 index 0000000000..df7dc4140b --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/address.json @@ -0,0 +1,212 @@ +[ + { + "model": "registration.address", + "pk": 1, + "fields": { + "street_address": "123 Main St", + "municipality": "Cityville", + "province": "ON", + "postal_code": "A1B 2C3" + } + }, + { + "model": "registration.address", + "pk": 2, + "fields": { + "street_address": "456 Elm St", + "municipality": "Townsville", + "province": "BC", + "postal_code": "X0Y 1Z0" + } + }, + { + "model": "registration.address", + "pk": 3, + "fields": { + "street_address": "123 Main St", + "municipality": "City", + "province": "ON", + "postal_code": "A1B 2C3" + } + }, + { + "model": "registration.address", + "pk": 4, + "fields": { + "street_address": "789 Oak St", + "municipality": "Village", + "province": "BC", + "postal_code": "M2N 3P4" + } + }, + { + "model": "registration.address", + "pk": 5, + "fields": { + "street_address": "101 Maple St", + "municipality": "Hamlet", + "province": "QC", + "postal_code": "H3Z 2Y7" + } + }, + { + "model": "registration.address", + "pk": 6, + "fields": { + "street_address": "202 Pine St", + "municipality": "Borough", + "province": "AB", + "postal_code": "T5K 1P2" + } + }, + { + "model": "registration.address", + "pk": 7, + "fields": { + "street_address": "303 Cedar St", + "municipality": "Metropolis", + "province": "ON", + "postal_code": "M4B 1B3" + } + }, + { + "model": "registration.address", + "pk": 8, + "fields": { + "street_address": "404 Birch St", + "municipality": "Uptown", + "province": "BC", + "postal_code": "V6B 2W3" + } + }, + { + "model": "registration.address", + "pk": 9, + "fields": { + "street_address": "505 Spruce St", + "municipality": "Downtown", + "province": "ON", + "postal_code": "K1A 0B1" + } + }, + { + "model": "registration.address", + "pk": 10, + "fields": { + "street_address": "606 Fir St", + "municipality": "Suburbia", + "province": "QC", + "postal_code": "G1V 4N7" + } + }, + { + "model": "registration.address", + "pk": 11, + "fields": { + "street_address": "707 Willow St", + "municipality": "Riverside", + "province": "MB", + "postal_code": "R3C 4A5" + } + }, + { + "model": "registration.address", + "pk": 12, + "fields": { + "street_address": "808 Poplar St", + "municipality": "Lakeside", + "province": "NS", + "postal_code": "B3H 2Y9" + } + }, + { + "model": "registration.address", + "pk": 13, + "fields": { + "street_address": "909 Aspen St", + "municipality": "Hillside", + "province": "NB", + "postal_code": "E3B 1A1" + } + }, + { + "model": "registration.address", + "pk": 14, + "fields": { + "street_address": "1010 Redwood St", + "municipality": "Seaside", + "province": "PE", + "postal_code": "C1A 7N8" + } + }, + { + "model": "registration.address", + "pk": 15, + "fields": { + "street_address": "1111 Chestnut St", + "municipality": "Mountainview", + "province": "NL", + "postal_code": "A1C 5H7" + } + }, + { + "model": "registration.address", + "pk": 16, + "fields": { + "street_address": "1212 Walnut St", + "municipality": "Forestville", + "province": "SK", + "postal_code": "S7K 3R5" + } + }, + { + "model": "registration.address", + "pk": 17, + "fields": { + "street_address": "1313 Hickory St", + "municipality": "Prairie", + "province": "MB", + "postal_code": "R2C 4A6" + } + }, + { + "model": "registration.address", + "pk": 18, + "fields": { + "street_address": "1414 Sycamore St", + "municipality": "Baytown", + "province": "ON", + "postal_code": "L4W 5N8" + } + }, + { + "model": "registration.address", + "pk": 19, + "fields": { + "street_address": "1515 Magnolia St", + "municipality": "Harbor", + "province": "BC", + "postal_code": "V8W 1N4" + } + }, + { + "model": "registration.address", + "pk": 20, + "fields": { + "street_address": "1616 Dogwood St", + "municipality": "Cove", + "province": "QC", + "postal_code": "J4Z 2Y8" + } + }, + { + "model": "registration.address", + "pk": 21, + "fields": { + "street_address": "1717 Alder St", + "municipality": "Grove", + "province": "ON", + "postal_code": "N2L 3G1" + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/bc_greenhouse_gas_id.json b/bc_obps/registration/fixtures/mock/v1/bc_greenhouse_gas_id.json new file mode 100644 index 0000000000..0313f27bc9 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/bc_greenhouse_gas_id.json @@ -0,0 +1,355 @@ +[ + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990005", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 1" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990004", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 2" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990003", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 3" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990002", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 4" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990001", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 5" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219999999", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 6" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990006", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 7" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990007", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 8" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990008", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 9" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990009", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 10" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990010", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 11" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990011", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 12" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990012", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 13" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990013", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 14" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990014", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 15" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990015", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 16" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990016", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 17" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990017", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 18" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990018", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 19" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990019", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 20" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990020", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 21" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990021", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 22" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990022", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 23" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "23219990023", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "For Operation 24" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990006", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990007", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990008", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990009", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990010", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990011", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990012", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990013", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990014", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990015", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990016", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990017", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990018", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990019", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990020", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990021", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990022", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990023", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990024", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990025", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990026", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990027", + "issued_at": "2024-10-31T15:27:00.000Z" + } + }, + { + "model": "registration.bcgreenhousegasid", + "fields": { + "id": "13219990999", + "issued_at": "2024-10-31T15:27:00.000Z" + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/bc_obps_regulated_operation.json b/bc_obps/registration/fixtures/mock/v1/bc_obps_regulated_operation.json new file mode 100644 index 0000000000..ebbda47cea --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/bc_obps_regulated_operation.json @@ -0,0 +1,18 @@ +[ + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0001", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + }, + { + "model": "registration.bcobpsregulatedoperation", + "fields": { + "id": "21-0002", + "issued_at": "2023-10-13T15:27:00.000Z", + "comments": "Test comment" + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/contact.json b/bc_obps/registration/fixtures/mock/v1/contact.json new file mode 100644 index 0000000000..01d2083fc1 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/contact.json @@ -0,0 +1,287 @@ +[ + { + "model": "registration.contact", + "pk": 1, + "fields": { + "business_role": "Operation Representative", + "first_name": "John", + "last_name": "Doe", + "position_title": "Manager", + "address": 1, + "email": "john.doe@example.com", + "phone_number": "+16044011234" + } + }, + { + "model": "registration.contact", + "pk": 2, + "fields": { + "business_role": "Operation Representative", + "first_name": "Jane", + "last_name": "Smith", + "position_title": "Manager", + "address": 2, + "email": "jane.smith@example.com", + "phone_number": "+16044011234" + } + }, + { + "model": "registration.contact", + "pk": 3, + "fields": { + "business_role": "Operation Representative", + "first_name": "Alice", + "last_name": "Johnson", + "position_title": "Manager", + "address": 3, + "email": "alice.johnson@example.com", + "phone_number": "+16044011235" + } + }, + { + "model": "registration.contact", + "pk": 4, + "fields": { + "business_role": "Operation Representative", + "first_name": "Bob", + "last_name": "Brown", + "position_title": "Manager", + "address": 4, + "email": "bob.brown@example.com", + "phone_number": "+16044011236" + } + }, + { + "model": "registration.contact", + "pk": 5, + "fields": { + "business_role": "Operation Representative", + "first_name": "Carol", + "last_name": "Davis", + "position_title": "Manager", + "address": 5, + "email": "carol.davis@example.com", + "phone_number": "+16044011237" + } + }, + { + "model": "registration.contact", + "pk": 6, + "fields": { + "business_role": "Operation Representative", + "first_name": "Dave", + "last_name": "Evans", + "position_title": "Manager", + "address": 6, + "email": "dave.evans@example.com", + "phone_number": "+16044011238" + } + }, + { + "model": "registration.contact", + "pk": 7, + "fields": { + "business_role": "Operation Representative", + "first_name": "Eve", + "last_name": "Foster", + "position_title": "Manager", + "address": 7, + "email": "eve.foster@example.com", + "phone_number": "+16044011239" + } + }, + { + "model": "registration.contact", + "pk": 8, + "fields": { + "business_role": "Operation Representative", + "first_name": "Frank", + "last_name": "Garcia", + "position_title": "Manager", + "address": 8, + "email": "frank.garcia@example.com", + "phone_number": "+16044011240" + } + }, + { + "model": "registration.contact", + "pk": 9, + "fields": { + "business_role": "Operation Representative", + "first_name": "Grace", + "last_name": "Harris", + "position_title": "Manager", + "address": 9, + "email": "grace.harris@example.com", + "phone_number": "+16044011241" + } + }, + { + "model": "registration.contact", + "pk": 10, + "fields": { + "business_role": "Operation Representative", + "first_name": "Henry", + "last_name": "Ives", + "position_title": "Manager", + "address": 10, + "email": "henry.ives@example.com", + "phone_number": "+16044011242" + } + }, + { + "model": "registration.contact", + "pk": 11, + "fields": { + "business_role": "Operation Representative", + "first_name": "Ivy", + "last_name": "Jones", + "position_title": "Manager", + "address": 11, + "email": "ivy.jones@example.com", + "phone_number": "+16044011243" + } + }, + { + "model": "registration.contact", + "pk": 12, + "fields": { + "business_role": "Operation Representative", + "first_name": "Jack", + "last_name": "King", + "position_title": "Manager", + "address": 12, + "email": "jack.king@example.com", + "phone_number": "+16044011244" + } + }, + { + "model": "registration.contact", + "pk": 13, + "fields": { + "business_role": "Operation Representative", + "first_name": "Karen", + "last_name": "Lewis", + "position_title": "Manager", + "address": 13, + "email": "karen.lewis@example.com", + "phone_number": "+16044011245" + } + }, + { + "model": "registration.contact", + "pk": 14, + "fields": { + "business_role": "Operation Representative", + "first_name": "Leo", + "last_name": "Martinez", + "position_title": "Manager", + "address": 14, + "email": "leo.martinez@example.com", + "phone_number": "+16044011246" + } + }, + { + "model": "registration.contact", + "pk": 15, + "fields": { + "business_role": "Operation Representative", + "first_name": "Mia", + "last_name": "Nelson", + "position_title": "Manager", + "address": 15, + "email": "mia.nelson@example.com", + "phone_number": "+16044011247" + } + }, + { + "model": "registration.contact", + "pk": 16, + "fields": { + "business_role": "Operation Representative", + "first_name": "Nina", + "last_name": "Owens", + "position_title": "Manager", + "address": 16, + "email": "nina.owens@example.com", + "phone_number": "+16044011248" + } + }, + { + "model": "registration.contact", + "pk": 17, + "fields": { + "business_role": "Operation Representative", + "first_name": "Oscar", + "last_name": "Perez", + "position_title": "Manager", + "address": 17, + "email": "oscar.perez@example.com", + "phone_number": "+16044011249" + } + }, + { + "model": "registration.contact", + "pk": 18, + "fields": { + "business_role": "Operation Representative", + "first_name": "Paula", + "last_name": "Quinn", + "position_title": "Manager", + "address": 18, + "email": "paula.quinn@example.com", + "phone_number": "+16044011250" + } + }, + { + "model": "registration.contact", + "pk": 19, + "fields": { + "business_role": "Operation Representative", + "first_name": "Quincy", + "last_name": "Roberts", + "position_title": "Manager", + "address": 19, + "email": "quincy.roberts@example.com", + "phone_number": "+16044011251" + } + }, + { + "model": "registration.contact", + "pk": 20, + "fields": { + "business_role": "Operation Representative", + "first_name": "Rachel", + "last_name": "Stewart", + "position_title": "Manager", + "address": 20, + "email": "rachel.stewart@example.com", + "phone_number": "+16044011252" + } + }, + { + "model": "registration.contact", + "pk": 21, + "fields": { + "business_role": "Operation Representative", + "first_name": "Sam", + "last_name": "Taylor", + "position_title": "Manager", + "address": 21, + "email": "sam.taylor@example.com", + "phone_number": "+16044011253" + } + }, + { + "model": "registration.contact", + "pk": 22, + "fields": { + "business_role": "Operation Representative", + "first_name": "Tina", + "last_name": "Upton", + "position_title": "Manager", + "email": "tina.upton@example.com", + "phone_number": "+16044011254" + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/document.json b/bc_obps/registration/fixtures/mock/v1/document.json new file mode 100644 index 0000000000..45012f49f4 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/document.json @@ -0,0 +1,20 @@ +[ + { + "model": "registration.document", + "pk": 1, + "fields": { + "file": "documents/file1.pdf", + "type": 2, + "description": "A signed statutory declaration for opt-in." + } + }, + { + "model": "registration.document", + "pk": 2, + "fields": { + "file": "documents/file2.pdf", + "type": 1, + "description": "A boundary map document." + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/mock_file.pdf b/bc_obps/registration/fixtures/mock/v1/mock_file.pdf new file mode 100644 index 0000000000..4b5001202e Binary files /dev/null and b/bc_obps/registration/fixtures/mock/v1/mock_file.pdf differ diff --git a/bc_obps/registration/fixtures/mock/v1/multiple_operator.json b/bc_obps/registration/fixtures/mock/v1/multiple_operator.json new file mode 100644 index 0000000000..ca37098756 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/multiple_operator.json @@ -0,0 +1,14 @@ +[ + { + "model": "registration.multipleoperator", + "fields": { + "operation": "b65a3fbc-c81a-49c0-a43a-67bd3a0b488e", + "legal_name": "Multiple Operator Legal Name", + "trade_name": "Multiple Operator Trade Name", + "cra_business_number": 123456789, + "bc_corporate_registry_number": "abc1234567", + "business_structure": "Sole Proprietorship", + "attorney_address": 1 + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/operation.json b/bc_obps/registration/fixtures/mock/v1/operation.json new file mode 100644 index 0000000000..e62bedad8f --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/operation.json @@ -0,0 +1,472 @@ +[ + { + "model": "registration.operation", + "pk": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", + "fields": { + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "verified_at": "2023-10-13T15:27:00.000Z", + "verified_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "documents": [], + "point_of_contact": 1, + "name": "Operation 1", + "type": "Linear Facility Operation", + "naics_code": 19, + "swrs_facility_id": 1001, + "regulated_products": [], + "status": "Not Started", + "created_at": "2024-2-01T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "Reporting Operation" + } + }, + { + "model": "registration.operation", + "pk": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "point_of_contact": 1, + "documents": [], + "name": "Operation 2", + "type": "Linear Facility Operation", + "naics_code": 20, + "opt_in": false, + "bcghg_id": "23219990004", + "regulated_products": [], + "status": "Not Started", + "created_at": "2024-2-02T15:27:00.000Z", + "activities": [1, 5], + "contacts": [10], + "registration_purpose": "OBPS Regulated Operation" + } + }, + { + "model": "registration.operation", + "pk": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "point_of_contact": 1, + "name": "Operation 3", + "submission_date": "2023-12-16T15:27:00.000Z", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990003", + "regulated_products": [2, 6, 7, 8], + "status": "Approved", + "bc_obps_regulated_operation": "21-0001", + "created_at": "2024-1-31T15:27:00.000Z", + "activities": [1, 3], + "contacts": [14, 15], + "registration_purpose": "OBPS Regulated Operation" + } + }, + { + "model": "registration.operation", + "pk": "c0743c09-82fa-4186-91aa-4b5412e3415c", + "fields": { + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "documents": [], + "submission_date": "2024-01-12T15:27:00.000Z", + "bc_obps_regulated_operation": "21-0002", + "point_of_contact": 1, + "name": "Operation 4", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990002", + "regulated_products": [], + "status": "Approved", + "created_at": "2024-1-30T15:27:00.000Z", + "activities": [1, 5], + "contacts": [10, 11, 12], + "registration_purpose": "OBPS Regulated Operation" + } + }, + { + "model": "registration.operation", + "pk": "b65a3fbc-c81a-49c0-a43a-67bd3a0b488e", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "submission_date": null, + "point_of_contact": 1, + "name": "Operation 5", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990001", + "regulated_products": [1, 2], + "registration_purpose": "OBPS Regulated Operation", + "status": "Draft", + "created_at": "2024-1-29T15:27:00.000Z", + "activities": [1, 5], + "operation_has_multiple_operators": true + } + }, + { + "model": "registration.operation", + + "pk": "d99725a7-1c3a-47cb-a59b-e2388ce0fa18", + "fields": { + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "documents": [], + "submission_date": "2024-01-14T15:27:00.000Z", + "point_of_contact": 1, + "name": "Operation 6", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219999999", + "regulated_products": [], + "status": "Draft", + "created_at": "2024-1-28T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "Opted-in Operation" + } + }, + { + "model": "registration.operation", + "pk": "436dd99a-cb41-4494-91c9-98ab149b557d", + "fields": { + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "documents": [], + "submission_date": "2024-01-15T15:27:00.000Z", + "point_of_contact": 1, + "name": "Operation 7", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990006", + "regulated_products": [], + "status": "Draft", + "created_at": "2024-1-27T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "Potential Reporting Operation" + } + }, + { + "model": "registration.operation", + "pk": "a47b5fb6-1e10-401a-b70e-574bd925db99", + "fields": { + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "documents": [], + "submission_date": "2024-01-16T15:27:00.000Z", + "point_of_contact": 1, + "name": "Operation 8", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990007", + "regulated_products": [], + "status": "Draft", + "created_at": "2024-1-26T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "Electricity Import Operation" + } + }, + { + "model": "registration.operation", + "pk": "21e70498-c4b0-4525-8443-86faa96206e3", + "fields": { + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "documents": [], + "submission_date": "2024-01-17T15:27:00.000Z", + "point_of_contact": 1, + "name": "Operation 9", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990008", + "regulated_products": [], + "status": "Draft", + "created_at": "2024-1-25T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "New Entrant Operation" + } + }, + { + "model": "registration.operation", + "pk": "17550cd8-3e73-4e52-aa91-ab90cb3b62b0", + "fields": { + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "documents": [], + "submission_date": "2024-01-18T15:27:00.000Z", + "point_of_contact": 1, + "name": "Operation 10", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990009", + "regulated_products": [], + "status": "Draft", + "created_at": "2024-1-24T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "Reporting Operation" + } + }, + { + "model": "registration.operation", + "pk": "7d3fc7d1-0504-4ee4-a9c5-447f4b324b57", + "fields": { + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "documents": [], + "submission_date": "2024-01-19T15:27:00.000Z", + "point_of_contact": 1, + "name": "Operation 11", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990010", + "regulated_products": [], + "status": "Draft", + "created_at": "2024-1-23T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "OBPS Regulated Operation" + } + }, + { + "model": "registration.operation", + "pk": "acf5811e-d521-43f7-a5c7-a6d6dd47bb31", + "fields": { + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "documents": [], + "submission_date": "2024-01-20T15:27:00.000Z", + "point_of_contact": 1, + "name": "Operation 12", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990011", + "regulated_products": [], + "status": "Draft", + "created_at": "2024-1-22T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "Reporting Operation" + } + }, + { + "model": "registration.operation", + "pk": "8563da83-0762-4d29-9b22-da5b52ef0f24", + "fields": { + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "documents": [], + "submission_date": "2024-01-21T15:27:00.000Z", + "point_of_contact": 1, + "name": "Operation 13", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990012", + "regulated_products": [], + "status": "Draft", + "created_at": "2024-1-21T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "OBPS Regulated Operation" + } + }, + { + "model": "registration.operation", + "pk": "df62d793-8cfe-4272-a93e-ea9c9139ff82", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "submission_date": "2024-01-22T15:27:00.000Z", + "point_of_contact": 2, + "name": "Operation 14", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990013", + "created_at": "2024-1-20T15:27:00.000Z", + "regulated_products": [1, 2, 3, 4], + "status": "Transferred", + "registration_purpose": "Electricity Import Operation" + } + }, + { + "model": "registration.operation", + "pk": "c5b3643b-c143-42f3-8a2b-03ccc7319cd9", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "submission_date": "2024-01-23T15:27:00.000Z", + "point_of_contact": 3, + "name": "Operation 15", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990014", + "regulated_products": [], + "status": "Closed", + "created_at": "2024-1-19T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "OBPS Regulated Operation" + } + }, + { + "model": "registration.operation", + "pk": "954c0382-ff61-4e87-a8a0-873586534b54", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "submission_date": "2024-01-24T15:27:00.000Z", + "point_of_contact": 1, + "name": "Operation 16", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990015", + "regulated_products": [], + "status": "Temporarily Shutdown", + "created_at": "2024-1-18T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "Potential Reporting Operation" + } + }, + { + "model": "registration.operation", + "pk": "6d07d02a-1ad2-46ed-ad56-2f84313e98bf", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "submission_date": "2024-01-25T15:27:00.000Z", + "point_of_contact": 4, + "name": "Operation 17", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990016", + "regulated_products": [], + "status": "Changes Requested", + "created_at": "2024-1-17T15:27:00.000Z", + "activities": [1, 5], + "registration_purpose": "OBPS Regulated Operation" + } + }, + { + "model": "registration.operation", + "pk": "59d95661-c752-489b-9fd1-0c3fa3454dda", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "submission_date": "2024-01-26T15:27:00.000Z", + "point_of_contact": 5, + "name": "Operation 18", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990017", + "regulated_products": [], + "status": "Declined", + "created_at": "2024-1-16T15:27:00.000Z", + "activities": [1, 5] + } + }, + { + "model": "registration.operation", + "pk": "1bd04128-d070-4d3a-940a-0874c4956181", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "submission_date": "2024-01-27T15:27:00.000Z", + "point_of_contact": 6, + "name": "Operation 19", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990018", + "regulated_products": [], + "status": "Registered", + "registration_purpose": "New Entrant Operation", + "created_at": "2024-1-15T15:27:00.000Z", + "activities": [1, 3] + } + }, + { + "model": "registration.operation", + "pk": "17f13f4d-29b4-45f4-b025-b21f2e126771", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "submission_date": "2024-01-28T15:27:00.000Z", + "name": "Operation 20", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990019", + "regulated_products": [], + "status": "Pending", + "created_at": "2024-1-14T15:27:00.000Z", + "activities": [1, 5] + } + }, + { + "model": "registration.operation", + "pk": "ef9044dd-2a27-4d26-86fe-02e51e0755f7", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "name": "Operation 21", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990020", + "regulated_products": [], + "status": "Pending", + "created_at": "2024-1-13T15:27:00.000Z", + "activities": [1, 5] + } + }, + { + "model": "registration.operation", + "pk": "aeeb781e-a97b-4ab2-9a6e-02e4522add1a", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "name": "Operation 22", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990021", + "regulated_products": [], + "status": "Pending", + "created_at": "2024-1-12T15:27:00.000Z", + "activities": [1, 5] + } + }, + { + "model": "registration.operation", + "pk": "02a3ab84-26c6-4a79-bf89-72f877ceef8e", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "name": "Operation 23", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990022", + "regulated_products": [], + "status": "Pending", + "created_at": "2024-1-11T15:27:00.000Z", + "activities": [1, 5] + } + }, + { + "model": "registration.operation", + "pk": "0ac72fa9-2636-4f54-b378-af6b1a070787", + "fields": { + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "documents": [], + "name": "Operation 24", + "type": "Single Facility Operation", + "naics_code": 21, + "opt_in": false, + "bcghg_id": "23219990023", + "regulated_products": [], + "status": "Pending", + "created_at": "2024-1-10T15:27:00.000Z", + "activities": [1, 3] + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/operator.json b/bc_obps/registration/fixtures/mock/v1/operator.json new file mode 100644 index 0000000000..6147b25e4f --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/operator.json @@ -0,0 +1,302 @@ +[ + { + "model": "registration.operator", + "pk": "685d581b-5698-411f-ae00-de1d97334a71", + "fields": { + "legal_name": "Operator 1 Legal Name", + "trade_name": "Operator 1 Trade Name", + "cra_business_number": 123456789, + "bc_corporate_registry_number": "abc1234567", + "business_structure": "Sole Proprietorship", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example.com", + "documents": [], + "contacts": [], + "status": "Draft", + "is_new": true, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "4242ea9d-b917-4129-93c2-db00b7451051", + "fields": { + "legal_name": "Existing Operator 2 Legal Name", + "trade_name": "Existing Operator 2 Trade Name", + "cra_business_number": 987654321, + "bc_corporate_registry_number": "def1234567", + "business_structure": "General Partnership", + "physical_address": 4, + "mailing_address": 3, + "website": "http://www.example2.com", + "documents": [], + "contacts": [10, 11, 12, 13, 14, 15], + "status": "Approved", + "is_new": false, + "verified_at": "2024-01-03 08:09:51.133556-08", + "verified_by": "00000000-0000-0000-0000-000000000002" + } + }, + { + "model": "registration.operator", + "pk": "438eff6c-d2e7-40ab-8220-29d3a86ef314", + "fields": { + "legal_name": "New Operator 3 Legal Name", + "trade_name": "New Operator 3 Trade Name", + "cra_business_number": 987654322, + "bc_corporate_registry_number": "ghi1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1], + "status": "Pending", + "is_new": true, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "7e8b72dc-4196-427f-a553-7879748139e1", + "fields": { + "legal_name": "Existing Operator 4 Legal Name", + "trade_name": "Existing Operator 4 Trade Name", + "cra_business_number": 987654323, + "bc_corporate_registry_number": "jkl1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1, 2], + "status": "Declined", + "is_new": false, + "verified_at": "2024-01-03 08:09:51.133556-08", + "verified_by": "00000000-0000-0000-0000-000000000002" + } + }, + { + "model": "registration.operator", + "pk": "4c1010c1-55ca-485d-84bd-6d975fd0af90", + "fields": { + "legal_name": "New Operator 5 Legal Name", + "trade_name": "New Operator 5 Trade Name", + "cra_business_number": 987654324, + "bc_corporate_registry_number": "mno1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1], + "status": "Draft", + "is_new": true, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "5712ee05-5f3b-4822-825d-6fffddafda4c", + "fields": { + "legal_name": "Existing Operator 6 Legal Name", + "trade_name": "Existing Operator 6 Trade Name", + "cra_business_number": 987654325, + "bc_corporate_registry_number": "pqr1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1], + "status": "Approved", + "is_new": false, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "edb1aff1-f888-4199-ab88-068364496347", + "fields": { + "legal_name": "New Operator 6 Legal Name", + "trade_name": "New Operator 6 Trade Name", + "cra_business_number": 987654326, + "bc_corporate_registry_number": "stu1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1], + "status": "Approved", + "is_new": true, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "ea4314ea-1974-465a-a851-278c8f9c8daa", + "fields": { + "legal_name": "New Operator 7 Legal Name", + "trade_name": "New Operator 7 Trade Name", + "cra_business_number": 987654327, + "bc_corporate_registry_number": "vwx1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1], + "status": "Approved", + "is_new": true, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "04384911-264a-4510-b582-11ee704b8e41", + "fields": { + "legal_name": "New Operator 8 Legal Name", + "trade_name": "New Operator 8 Trade Name", + "cra_business_number": 987654328, + "bc_corporate_registry_number": "yza1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1], + "status": "Approved", + "is_new": true, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "f209ef09-dfe6-42a1-ac4c-7689897f1b51", + "fields": { + "legal_name": "New Operator 9 Legal Name", + "trade_name": "New Operator 9 Trade Name", + "cra_business_number": 987654329, + "bc_corporate_registry_number": "bcd1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1], + "status": "Approved", + "is_new": true, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "bb979661-0782-49b2-9c64-acd8424b692b", + "fields": { + "legal_name": "New Operator 10 Legal Name", + "trade_name": "New Operator 10 Trade Name", + "cra_business_number": 987654330, + "bc_corporate_registry_number": "efg1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1], + "status": "Approved", + "is_new": true, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "bb702949-e303-4788-9ba9-806232a5f711", + "fields": { + "legal_name": "New Operator 11 Legal Name", + "trade_name": "New Operator 11 Trade Name", + "cra_business_number": 987654331, + "bc_corporate_registry_number": "hij1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1], + "status": "Approved", + "is_new": true, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "a35fb5ad-edd9-4465-982e-81b824644d07", + "fields": { + "legal_name": "New Operator 12 Legal Name", + "trade_name": "New Operator 12 Trade Name", + "cra_business_number": 987654332, + "bc_corporate_registry_number": "klm1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1], + "status": "Approved", + "is_new": true, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "5c847c75-3b17-414c-97f8-88ba81cb3821", + "fields": { + "legal_name": "New Operator 13 Legal Name", + "trade_name": "New Operator 13 Trade Name", + "cra_business_number": 987654333, + "bc_corporate_registry_number": "nop1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [1], + "status": "Approved", + "is_new": true, + "verified_at": null, + "verified_by": null + } + }, + { + "model": "registration.operator", + "pk": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", + "fields": { + "legal_name": "Existing Operator 14 Legal Name", + "trade_name": "Existing Operator 14 Trade Name", + "cra_business_number": 987654334, + "bc_corporate_registry_number": "pqz1234567", + "business_structure": "BC Corporation", + "physical_address": 3, + "mailing_address": 4, + "website": "http://www.example2.com", + "documents": [], + "contacts": [], + "status": "Approved", + "is_new": false, + "verified_at": "2024-01-03 08:09:51.133556-08", + "verified_by": "00000000-0000-0000-0000-000000000002" + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/parent_operator.json b/bc_obps/registration/fixtures/mock/v1/parent_operator.json new file mode 100644 index 0000000000..1751f2aa70 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/parent_operator.json @@ -0,0 +1,17 @@ +[ + { + "model": "registration.parentoperator", + "pk": 1, + "fields": { + "child_operator": "5712ee05-5f3b-4822-825d-6fffddafda4c", + "legal_name": "Parent Operator Legal Name", + "trade_name": "Parent Operator Trade Name", + "operator_index": 1, + "cra_business_number": 123456780, + "bc_corporate_registry_number": "zzz1212121", + "business_structure": "Sole Proprietorship", + "physical_address": 3, + "mailing_address": 4 + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/partner_operator.json b/bc_obps/registration/fixtures/mock/v1/partner_operator.json new file mode 100644 index 0000000000..d64415b40a --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/partner_operator.json @@ -0,0 +1,14 @@ +[ + { + "model": "registration.partneroperator", + "pk": 1, + "fields": { + "bc_obps_operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "legal_name": "Partner Operator Legal Name", + "trade_name": "Partner Operator Trade Name", + "cra_business_number": 123456780, + "bc_corporate_registry_number": "zzz1212121", + "business_structure": "General Partnership" + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/user.json b/bc_obps/registration/fixtures/mock/v1/user.json new file mode 100644 index 0000000000..1381433eb4 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/user.json @@ -0,0 +1,464 @@ +[ + { + "model": "registration.user", + "fields": { + "user_guid": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "New Operator 3 Legal Name", + "first_name": "Michael", + "last_name": "Johnson", + "position_title": "Manager", + "email": "michael@example.com", + "phone_number": "+16044011234", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000001", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Existing Operator 2 Legal Name", + "first_name": "Samantha", + "last_name": "Garcia", + "position_title": "CEO", + "email": "samantha@example.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "4da70f32-65fd-4137-87c1-111f2daba3dd", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "Administrator", + "last_name": "Hogan", + "position_title": "Code Monkey", + "email": "somebody@email.com", + "phone_number": "+16044015432", + "app_role": "cas_director" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "ba2ba62a121842e0942aab9e92ce8822", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Existing Operator 2 Legal Name", + "first_name": "bc-cas-dev", + "last_name": "Industry User", + "position_title": "Code Monkey", + "email": "email@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "279c80cf57814c28872740a133d17c0d", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "bc-cas-dev-secondary", + "last_name": "Industry User", + "position_title": "Code Monkey", + "email": "email@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000002", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "New Operator 5 Legal Name", + "first_name": "Jack", + "last_name": "Sparrow", + "position_title": "Captain", + "email": "email@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000003", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "3", + "position_title": "Code Monkey", + "email": "test1@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000004", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "4", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000005", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "5", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000006", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "6", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000007", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "7", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000008", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "8", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000009", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "9", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000010", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "10", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000011", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "11", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000012", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "12", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000013", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "10", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000014", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "14", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000015", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "15", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000016", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "16", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000017", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "17", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000018", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "18", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000019", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "19", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000020", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "20", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000021", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "21", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000022", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "22", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000023", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "23", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000024", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "24", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000025", + "business_guid": "b3e3e3e3-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User 25", + "last_name": "25", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000026", + "business_guid": "b6e6e6e6-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User 26", + "last_name": "26", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000027", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "User", + "last_name": "10", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "industry_user" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "58f255ed-8d46-44ee-b2fe-9f8d3d92c684", + "business_guid": "efb76d57-88b7-4eb6-9f26-ec12b49c14c1", + "bceid_business_name": "Example Business", + "first_name": "E2E", + "last_name": "StorageState", + "position_title": "Code Monkey", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "cas_admin" + } + }, + { + "model": "registration.user", + "fields": { + "user_guid": "00000000-0000-0000-0000-000000000028", + "business_guid": "00000000-0000-0000-0000-000000000000", + "bceid_business_name": "BCGOV", + "first_name": "CAS", + "last_name": "ANALYST", + "position_title": "Analyst", + "email": "test2@email.com", + "phone_number": "+16044015432", + "app_role": "cas_analyst" + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/user_operator.json b/bc_obps/registration/fixtures/mock/v1/user_operator.json new file mode 100644 index 0000000000..6ddf11a83e --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/user_operator.json @@ -0,0 +1,350 @@ +[ + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000001", + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "role": "admin", + "status": "Approved", + "verified_at": "2024-02-26 06:24:57.293242-08", + "verified_by": "ba2ba62a121842e0942aab9e92ce8822", + "user_friendly_id": 1 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "ba2ba62a121842e0942aab9e92ce8822", + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "role": "admin", + "status": "Approved", + "verified_at": "2024-02-26 06:24:57.293242-08", + "verified_by": "58f255ed-8d46-44ee-b2fe-9f8d3d92c684", + "user_friendly_id": 2 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "279c80cf57814c28872740a133d17c0d", + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "role": "pending", + "status": "Declined", + "verified_at": "2024-02-27 06:24:57.293242-08", + "verified_by": "58f255ed-8d46-44ee-b2fe-9f8d3d92c684", + "user_friendly_id": 3 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "operator": "438eff6c-d2e7-40ab-8220-29d3a86ef314", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 4 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000002", + "operator": "4c1010c1-55ca-485d-84bd-6d975fd0af90", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 5 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000003", + "operator": "edb1aff1-f888-4199-ab88-068364496347", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 6 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000004", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 7 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000005", + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 8 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000006", + "operator": "04384911-264a-4510-b582-11ee704b8e41", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 9 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000007", + "operator": "5712ee05-5f3b-4822-825d-6fffddafda4c", + "role": "admin", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 10 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000008", + "operator": "ea4314ea-1974-465a-a851-278c8f9c8daa", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 11 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000009", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 12 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000010", + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 13 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000011", + "operator": "f209ef09-dfe6-42a1-ac4c-7689897f1b51", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 14 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000012", + "operator": "bb979661-0782-49b2-9c64-acd8424b692b", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 15 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000013", + "operator": "bb702949-e303-4788-9ba9-806232a5f711", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 16 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000014", + "operator": "5712ee05-5f3b-4822-825d-6fffddafda4c", + "role": "admin", + "status": "Declined", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 17 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000015", + "operator": "5712ee05-5f3b-4822-825d-6fffddafda4c", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 18 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000016", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 19 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000017", + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 20 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000018", + "operator": "a35fb5ad-edd9-4465-982e-81b824644d07", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 21 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000019", + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 22 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000020", + "operator": "ea4314ea-1974-465a-a851-278c8f9c8daa", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 23 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000021", + "operator": "5712ee05-5f3b-4822-825d-6fffddafda4c", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 24 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000022", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 25 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000023", + "operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "role": "admin", + "status": "Approved", + "verified_at": "2024-02-26 06:24:57.293242-08", + "verified_by": "58f255ed-8d46-44ee-b2fe-9f8d3d92c684", + "user_friendly_id": 26 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000024", + "operator": "5712ee05-5f3b-4822-825d-6fffddafda4c", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 27 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000025", + "operator": "edb1aff1-f888-4199-ab88-068364496347", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 28 + } + }, + { + "model": "registration.useroperator", + "fields": { + "user": "00000000-0000-0000-0000-000000000026", + "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", + "role": "pending", + "status": "Pending", + "verified_at": null, + "verified_by": null, + "user_friendly_id": 29 + } + } +] diff --git a/docs/registration_part_2/data-models.md b/docs/registration_part_2/data-models.md index 24c56110ab..ff14dc63af 100644 --- a/docs/registration_part_2/data-models.md +++ b/docs/registration_part_2/data-models.md @@ -28,3 +28,11 @@ If you need to change something: - See if it's possible to make the change in a way to make the existing models work for both v1 and v2. For example, in v1 we have `operation_type` as a `CharField`, and in v2 it will be a foreign key field to an `OperationType` models. We can add the v1 types (they were selected via dropdown so only a few options) to to the `OperationType` model so that both v1 and v2 can use the foreign key table. - If it's not possible to use the same models, we'll have to look into field or model versioning. E.g. of field versioning: We have `data_field`. We create `data_field_1`. Once we are done with v2, we can remove `data_field` and rename `data_field_1` to `data_field`. + +## Mock data + +v1 and v2 have separate fixtures. This is so that we can keep the v1 e2e tests running while allowing v2 testers to see more accurate data. For example, the only allowed operation.status in v2 are NOT STARTED, DRAFT, and REGISTERED. v1 had additional statuses that are still supported but can't be assigned, and it's confusing for testers to see these old statues. + +v1 fixtures are stored in `bc_obps/registration/fixtures/mock/v1`. They can be loaded with the v1-specific make command `loadfixtures_v1`, and the v1 e2e tests run this command. + +v2 fixtures are in `bc_obps/registration/fixtures/mock/`. The model tests, v2 e2e tests, and make `loadfixtures` point to this directory.