From 91d6381af67b0064525a605680535f96e37a4ed0 Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Wed, 18 Dec 2024 15:31:35 -0800 Subject: [PATCH 1/6] chore: separate load_fixtures command for reg v1/v2 --- bc_obps/Makefile | 5 ++ .../management/commands/load_fixtures_v1.py | 70 +++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 bc_obps/common/management/commands/load_fixtures_v1.py diff --git a/bc_obps/Makefile b/bc_obps/Makefile index 3f3941d667..3f08fa97df 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 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_v1.py b/bc_obps/common/management/commands/load_fixtures_v1.py new file mode 100644 index 0000000000..703960fd19 --- /dev/null +++ b/bc_obps/common/management/commands/load_fixtures_v1.py @@ -0,0 +1,70 @@ +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' + 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}/facility.json', + f'{fixture_base_dir}/facility_designated_operation_timeline.json', + f'{fixture_base_dir}/operation_designated_operator_timeline.json', + f'{fixture_base_dir}/restart_event.json', + f'{fixture_base_dir}/closure_event.json', + f'{fixture_base_dir}/temporary_shutdown_event.json', + f'{fixture_base_dir}/transfer_event.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) From f044fc7e4b475c3c3be5782b7f3d41f415e03c1c Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Wed, 18 Dec 2024 15:32:40 -0800 Subject: [PATCH 2/6] test: separate v1/v2 test-setup endpoints --- bc_obps/registration/api/v1/e2e_test_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) From a27a6d837c5b19532624a19c0f420f1523821662 Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Wed, 18 Dec 2024 15:33:30 -0800 Subject: [PATCH 3/6] chore: separate mock data files --- .../fixtures/mock/v1/address.json | 212 ++++++++ .../mock/v1/bc_greenhouse_gas_id.json | 355 +++++++++++++ .../mock/v1/bc_obps_regulated_operation.json | 18 + .../fixtures/mock/v1/closure_event.json | 27 + .../fixtures/mock/v1/contact.json | 287 +++++++++++ .../fixtures/mock/v1/document.json | 20 + .../fixtures/mock/v1/facility.json | 338 +++++++++++++ ...acility_designated_operation_timeline.json | 236 +++++++++ .../fixtures/mock/v1/mock_file.pdf | Bin 0 -> 5938 bytes .../fixtures/mock/v1/multiple_operator.json | 14 + .../fixtures/mock/v1/operation.json | 472 ++++++++++++++++++ ...peration_designated_operator_timeline.json | 156 ++++++ .../fixtures/mock/v1/operator.json | 302 +++++++++++ .../fixtures/mock/v1/parent_operator.json | 17 + .../fixtures/mock/v1/partner_operator.json | 14 + .../fixtures/mock/v1/restart_event.json | 45 ++ .../mock/v1/temporary_shutdown_event.json | 35 ++ .../fixtures/mock/v1/transfer_event.json | 47 ++ .../registration/fixtures/mock/v1/user.json | 464 +++++++++++++++++ .../fixtures/mock/v1/user_operator.json | 350 +++++++++++++ 20 files changed, 3409 insertions(+) create mode 100644 bc_obps/registration/fixtures/mock/v1/address.json create mode 100644 bc_obps/registration/fixtures/mock/v1/bc_greenhouse_gas_id.json create mode 100644 bc_obps/registration/fixtures/mock/v1/bc_obps_regulated_operation.json create mode 100644 bc_obps/registration/fixtures/mock/v1/closure_event.json create mode 100644 bc_obps/registration/fixtures/mock/v1/contact.json create mode 100644 bc_obps/registration/fixtures/mock/v1/document.json create mode 100644 bc_obps/registration/fixtures/mock/v1/facility.json create mode 100644 bc_obps/registration/fixtures/mock/v1/facility_designated_operation_timeline.json create mode 100644 bc_obps/registration/fixtures/mock/v1/mock_file.pdf create mode 100644 bc_obps/registration/fixtures/mock/v1/multiple_operator.json create mode 100644 bc_obps/registration/fixtures/mock/v1/operation.json create mode 100644 bc_obps/registration/fixtures/mock/v1/operation_designated_operator_timeline.json create mode 100644 bc_obps/registration/fixtures/mock/v1/operator.json create mode 100644 bc_obps/registration/fixtures/mock/v1/parent_operator.json create mode 100644 bc_obps/registration/fixtures/mock/v1/partner_operator.json create mode 100644 bc_obps/registration/fixtures/mock/v1/restart_event.json create mode 100644 bc_obps/registration/fixtures/mock/v1/temporary_shutdown_event.json create mode 100644 bc_obps/registration/fixtures/mock/v1/transfer_event.json create mode 100644 bc_obps/registration/fixtures/mock/v1/user.json create mode 100644 bc_obps/registration/fixtures/mock/v1/user_operator.json 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/closure_event.json b/bc_obps/registration/fixtures/mock/v1/closure_event.json new file mode 100644 index 0000000000..7f0710ff55 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/closure_event.json @@ -0,0 +1,27 @@ +[ + { + "model": "registration.closureevent", + "pk": "87a669d0-66d4-47a2-9c2c-34c9e60740d0", + "fields": { + "created_by": "ba2ba62a121842e0942aab9e92ce8822", + "created_at": "2024-06-05T23:25:37.892Z", + "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", + "effective_date": "2024-09-01T09:00:00Z", + "description": "Homer Simpson burned the entire nuclear reactor down" + } + }, + { + "model": "registration.closureevent", + "pk": "127ccfbf-c344-4dcd-8c98-bbd9303d22a9", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-08-20T18:23:08.327Z", + "effective_date": "2026-01-10T09:00:00Z", + "facilities": [ + "459b80f9-b5f3-48aa-9727-90c30eaf3a58", + "f486f2fb-62ed-438d-bb3e-0819b51e3aeb" + ], + "description": "" + } + } +] 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/facility.json b/bc_obps/registration/fixtures/mock/v1/facility.json new file mode 100644 index 0000000000..43202c8b01 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/facility.json @@ -0,0 +1,338 @@ +[ + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aeb", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 1", + "type": "Large Facility", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "459b80f9-b5f3-48aa-9727-90c30eaf3a58", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-05T23:18:59.623Z", + "name": "Facility 2", + "type": "Large Facility", + "address": 1, + "swrs_facility_id": 1002, + "bcghg_id": "13219990006", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aec", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 3", + "type": "Medium Facility", + "swrs_facility_id": 1003, + "bcghg_id": "13219990007", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aed", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 4", + "type": "Small Aggregate", + "swrs_facility_id": 1004, + "bcghg_id": "13219990008", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aee", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 5", + "type": "Large Facility", + "swrs_facility_id": 1005, + "bcghg_id": "13219990009", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aef", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 6", + "type": "Large Facility", + "swrs_facility_id": 1006, + "bcghg_id": "13219990010", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af0", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 7", + "type": "Large Facility", + "swrs_facility_id": 1007, + "bcghg_id": "13219990011", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af1", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 8", + "type": "Large Facility", + "swrs_facility_id": 1008, + "bcghg_id": "13219990012", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af2", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 9", + "type": "Large Facility", + "swrs_facility_id": 1009, + "bcghg_id": "13219990013", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af3", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 10", + "type": "Large Facility", + "swrs_facility_id": 1010, + "bcghg_id": "13219990014", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af4", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 11", + "type": "Large Facility", + "swrs_facility_id": 1011, + "bcghg_id": "13219990015", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af5", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 12", + "type": "Large Facility", + "swrs_facility_id": 1012, + "bcghg_id": "13219990016", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af6", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 13", + "type": "Large Facility", + "swrs_facility_id": 1013, + "bcghg_id": "13219990017", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af7", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 14", + "type": "Large Facility", + "swrs_facility_id": 1014, + "bcghg_id": "13219990018", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af8", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 15", + "type": "Large Facility", + "swrs_facility_id": 1015, + "bcghg_id": "13219990019", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af9", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 16", + "type": "Large Facility", + "swrs_facility_id": 1016, + "bcghg_id": "13219990020", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afa", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 17", + "type": "Large Facility", + "swrs_facility_id": 1017, + "bcghg_id": "13219990021", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afb", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 18", + "type": "Large Facility", + "swrs_facility_id": 1018, + "bcghg_id": "13219990022", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afc", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 19", + "type": "Large Facility", + "swrs_facility_id": 1019, + "bcghg_id": "13219990023", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afd", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 20", + "type": "Large Facility", + "swrs_facility_id": 1020, + "bcghg_id": "13219990024", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afe", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 21", + "type": "Large Facility", + "swrs_facility_id": 1021, + "bcghg_id": "13219990025", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aff", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 22", + "type": "Single Facility", + "swrs_facility_id": 1022, + "bcghg_id": "13219990026", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "459b80f9-b5f3-48aa-9727-90c30eaf3a59", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-05T23:18:59.623Z", + "name": "Facility 23", + "type": "Large Facility", + "address": 2, + "swrs_facility_id": 1023, + "bcghg_id": "13219990027", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + }, + { + "model": "registration.facility", + "pk": "4486f2fb-62ed-438d-bb3e-0819b51e3aff", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:18:07.664Z", + "name": "Facility 24", + "type": "Single Facility", + "swrs_facility_id": 1024, + "bcghg_id": "13219990999", + "latitude_of_largest_emissions": 43.5, + "longitude_of_largest_emissions": -123.5 + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/facility_designated_operation_timeline.json b/bc_obps/registration/fixtures/mock/v1/facility_designated_operation_timeline.json new file mode 100644 index 0000000000..7af437d129 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/facility_designated_operation_timeline.json @@ -0,0 +1,236 @@ +[ + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:19:34.959Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aeb", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:19:32Z", + "status": "Closed" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-05T23:19:57.459Z", + "facility": "459b80f9-b5f3-48aa-9727-90c30eaf3a58", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:19:56Z", + "end_date": "2024-06-28T23:20:02Z", + "status": "Transferred" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:19:58.000Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aec", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:19:57Z", + "status": "Temporarily Shutdown" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:19:58.500Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aed", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:19:58Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:19:59.000Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aee", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:19:59Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:19:59.500Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aef", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:19:59Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:00.000Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af0", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:00Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:00.500Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af1", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:00Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:01.000Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af2", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:01Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:01.500Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af3", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:01Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:02.000Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af4", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:02.500Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af5", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:03.000Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af6", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:03Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:03.500Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af7", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:03Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:04.000Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af8", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:04Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:04.500Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af9", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:04Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:05.000Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afa", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:05Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-06-05T23:20:05.500Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afb", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:05Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-05T23:20:06.000Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afd", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:06Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-05T23:20:06.500Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afe", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "start_date": "2024-06-05T23:20:06Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-05T23:20:07.000Z", + "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aff", + "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", + "start_date": "2024-06-05T23:20:07Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "459b80f9-b5f3-48aa-9727-90c30eaf3a58", + "operation": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", + "start_date": "2024-06-28T23:20:02Z" + } + }, + { + "model": "registration.facilitydesignatedoperationtimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-06-20T23:20:02Z", + "facility": "4486f2fb-62ed-438d-bb3e-0819b51e3aff", + "operation": "1bd04128-d070-4d3a-940a-0874c4956181", + "start_date": "2024-06-28T23:20:02Z" + } + } +] 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 0000000000000000000000000000000000000000..4b5001202e5ca057d7e1b682cd622e021cab3c6b GIT binary patch literal 5938 zcmai&2|QHY`@oUHs8AvjH(9dIj9E~&vF|%sV=x%Y&=`BRBH6NK57{bYsZm6TWQk0Y zEWJp!vJ@)2`rlFg-rl$0|MR<_xifQ~vpnaV=eg&8pGVM8Rb2uuiGT>UO|MMP-}-#x zMO!-r0l)w+2RDeE8~|0vdysHM@Ye%N!l~jMy_|3WR2N5ZA-Mu@83dr90P!Iaaad1C z0BvrPB6BN@y=^Tt_H$SnS}$km(AlR?E0)mn?B1-WuZ4!eJVkw3F-%h*c_+paYi_^b zSM=R`fdO^BH##|`Bu187N?Vj+{B39F#j_*f@|_2(E?&zPU^{MqN2d5s%@y0sh0IE$? zeBc0TSBZiGXcVB zO{LIqssC>Ee^@%*-_&H7Bbw4E-T2}VKOp#pJBSH*c}DXHy-|!-xFOx;NFhJfz3S|2 zBIZt}k7+fc`5o2RnJ-;*7-U*uHEeG&QdOHCjdy4IRDt?Dmc7$qIX*mFJ2>p}DP*vo z#&G*0eJja=HXK=C!Txc+#pclA?zT0$qpY+CEodK4I6Kp8tgF(!+HRE3%DS!DPG0>e z8Sd2ZM!eZj$mjL4FU@AS{Uq=`sfhD&i2Fcse6 zpKPo0SiLnP*3gxiAv9IMZQ0B92$>h(U^td7I8hW&Utp6d_|~Q90t2qmR4bcidhJwy z|N3=Z8W?+)UC*pgfk%v#8avm=m=!u2#%pb|kBA53He_A%Xaa7!OvTd2XgSduXK~T;^^EIA^YA!t zsL76eXV8|}vd{u04-=nfIqtD=2inL%vnpVfbDZ3iW=2!vxld_&;*P;5fM#VcP0iT# z&%BpC&ZV@y+b_%!yxsPtX2?85F0THP-Kwk7e=CyPk+&&wtFh9QEGJ=>0XO$Qaj#D7grWBuOVoWZ1w& z*ip1F16OFSJG-l|9Zg7-tYMuNL#LNKjmpVA0tCe%x{!HmRyd@y>5*$ia+Ob_RM5BC zO+IFuSi*!ZhTmjnb$_B0QLs>)t7tsZqlNBJ5(DW51Q{U-qZ7A3z!Q$}-ZKW!M22g! z?n&PxsY!=dqQ8ex7@~n-;6t>2m)yK*UPT1Gpx3{M_TFbhfA;YKZ|42s8cLAMEjlpT zu?Rfl#U<7wg_yD=j$)Q9<=3potQZ4TForVhd!DMqB(bI_ZM+b=eN^;PS%He7{Fjp? z?s`VsOPe(pUrbl3mYsC4_}Ie)&E)e_d-g>a zU^9<$v~x{HTgFc~m}6f%Xu}3F9W%{!IcLz$tcZw>izN;NcW+t<-%<2qLbK&0NVJ*T zC)!(AXWZR0gk3npbFkwv*E=5X(7K~GQUp{beJ#sid_(yBlLHe%%K?u>$JjqzWNGnP za=37!2@=K=#yg(K*WN6g#AHS9ev#!wIw0U7V9LtPILo*b$<~TAinwh+;=jxq*ka?G>AtnmChMd3giQJf-EVD zhSyFBu^VXfs3{NY%W6MV3RDVIDKS29oAAn_EVDk>%Aip-L^}kkk&4LpoH5x|ky@VY zo;IHmENF0TFvCB?PBLHE?nIdOx0~B_bVe;oEhZ5~)#e526E&^!QCe!*g=r2~9I_o^ z94@^>Jv9=1loF9rd&rH!uQ$IZY!uP)M z3lmNdXFYvtnrE7On*7XoUn|Uh9bwE>5}z915TE!NIrES*NqK{=!k_#8NF;4TlpuN` zjX%vfjW#W@OxMh7fPEmh%(Kkk70gY@4eK`SwlyGGo@jr~ zB*)1XR8%hBlIT+?9xa!zaJ)^na4FI!_a3%Qk+hb^)Y{aV_$wReKrNtlRYso*6pZpK z@{5}_nytg0J$?a<*vDaVT5cD_7Bpk?utgJ&C(Dw{`$UVZiq5plI6gQZyR0y2EmR$o ztCgaa(4}WG^lHr1zMfJ;+3!B%DugUYHFOkK|7B@;NB#8;*(Y+H7m5ONHpH0a<1FHG zIYv3`#23X)B<98WEJZB$T6osXRc}5SY0GxEbqwja>^A90?!7rWbHAcgV%)EJG2~3P zZS^QegMI^L_24T1me3ZQK|VSly7A!J5XtXULuAMR+x+{9y58mZNe1Cy;k*4>x5jfV zdqsK=^cFGi=Un1^C2^G4cYdOdhnOtsBpGiP;9c;_>`mIF)%<3U-eAJ4Uz=y!=#c#I zPTiImiw;Y&MqJ0WTdA|$6y|eRGOErdpRKA*S#$X0_UV?wX@wYt1ck#*eof^e&~@w% z-HzYp=;y(u+0DT%19}T`qDpXp>1in$OnCCCt&l6gHCx{ z#V<;Z3ANw$$fnOxNpa*Ip@qOYvw+Y5e|iZAHC2_i2F=9Imz^4M2^=~c{_0&CPt^uA z^wfgYGSqZ3EW|CzQ|j?n@xV=a4!&bYf(87DrE4!ob)qL1-a#fmN+N91$qOUI`_rY} zl*%N#7R&RZyvO*CkF$P{Iow)0ty}rU?xFuQ{a|WC^j6AjyVz{Pvh6x)^1_YK zC&(h0O8qnZz(=#gg-U(Nx~F_Bof|T*e$)M`8846{c*&BP>~?R=MFW@r%&3QL=F3#} z6ruZg*XORSP?R&u-`Azd@7v|=7Su=ggB4M)D{bC9)c3b-sh{}TG@s}RcxnzWb*pzL z;Es(GV#i(?-7u#P|nDhO@m-yAJZ1OV~9ZGWVk?T3K`Tn6R%I#6haWS0H zr_YiU>T9N6=2li$j&(<5RGnLXNGyHRxV3GTQSMSHYkMXnH>7d#@=n5Q-iEw%yM<8v zhx?yA8$WoHchV;-t~TurnccMAf{v}$hfH7no_lOh+`i3^l1;(i&;2F;A!KZ)kD-+1 zoMKOq%#Q1hHnYDEePu+Fl6|@^qdVUyJ;_ z^(SUi36=`JAnaE7a83Y~RgD4LU+79j?O$yCH;McFo2{wHDh*OK6_kBJ7={B- z9lVndh|yG(2gm!3hGqX4QUy!GdU(0~pnRX7c>gy(Q;GVYbJzuLsEMxwX*W19CHmri zOpdySAC(yDr6PtQ;;|kQ%3dB$dZs@>T@~l!NW^=SyoeAuH7o$*1XC|F0)98Hg8!H< z7;_PQNGh&aB7gvKT^IYafJ6e&vv?>wi}3qhgKfRwZhfJRI2$`D{T zYMFXd>!|ndd$6nL*P4FDa#FIg{~P;lle^uXz*yDRHX#!IYD+_bDEs{<1mCLhy;@`# zdO5`CX4(0yHEdiArB@I~mig>}eAfHb#8WS6I49rq31+q3jq;iFH5S)#=`KIC7%lpj z_|sQIr;`gFTFyLn^xV=)FG-RL*68Nh=07Ve@4LKJXCAJG@V; zu&j87cQVgsk|B|~Z#30jhOjVvK2ac^>N?=mF z`@CH+%{5)Hw~dXjFFDi066M^SnVIx*EU?K_`a5m2^muUZMxKwtI7L=?jh8QOKZf=? z9f!R=a!JUEbAwTBz0qtPdFYBsfp?h(9>qCzn zzn^vGOx!25vhK~f__8RXufRsmOT#j~|9git=8ke3?q248S9_KhpSKX4ATnE_Wv11Q}A7bDytem*TX>=)RELIS ze812B)S<7U5en!S*W7{o=i1Fqb{`x@cUV+@ZT4?$F7#Vp`ta5z%h&k9vc9KDe#c?L zTII^JL!h2kXme0d;M=z!4-q65jX8Zoj>Xv?moz?EuC_47J{EcBx|NpdN*(8LbXJfv zjNH~CohFu(#q|u&dr}%s6qd_PkWe!&Ja;4B!@1pZ(eLDmDTG1j$+-tz7T$L^zFOO9 zoE=+PLqAO4sKbm{Y%FbFG4I*#sSw#o!`SKE_CBMwD!+Nj$NSt16*xMUlis>i#Sj13 z^1vM@7*M01?rEN8?_}II_030ZWBw9bpW-31?WNrJbISpY_%}Yw{R3GC zjFq0Hs(v%4drsE5#8_$_Line7YX{BK z2z%{l-}(mfJ2c_lWU2aGRvYD=ocZF7!yL(REt*_h@%z~JxL2o|V>-)f*6*Cw8v4+- zq-^F`BYa4Ld`c^>=)Qt!sX+el>}r(gH34DDg|WWj;l9Do+Z#P>H$NGd+`yujSAQ3)8pZxT1h9ubxd6tVeENO>47$B70drlcW8hFz0N~X@pDk@=7Xr?>2 zWo(F!d?z!MuPjW2m@h#5TAF5FdEhRo29m4KFN$&}pXMRC-FM?@6}l_pveU2)&G*22 zqNVFDHahF~-p*?7@5!jzw`O(UpSdIP?b*mUB{o7mee7&ex828M$Cx6;xUWVru=wAY zx62jd-~KPh?e95EFsj-8sPkCY;4NL%Y9MK2wMF8MPNrWUEusNmdi}!E>q!6lT zn2iWvD`->S-yM6cUDjfu|xIi9lPyV8Y-B zY^UetL~R26|4sfr6$6MkX9##|BO&17{qq9QC=>z(I0L_AQqmxRP%nV+ONNj_fS~YC z84L#Uz`tb(nLqo&!6f9r+kxeO%Mb`OxP#Q|Z@n<244AC^rwoCB|0$D2{-FbblK!I| z5)LxQzs5r$5WmftM8twG6yk0o+5{hj1NRC{yn1qOfo{4&@BP!5kGJ|GUW#TJj-*ez0pK6bc512nwnhs6+k_ D<$3~B literal 0 HcmV?d00001 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/operation_designated_operator_timeline.json b/bc_obps/registration/fixtures/mock/v1/operation_designated_operator_timeline.json new file mode 100644 index 0000000000..97631998fa --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/operation_designated_operator_timeline.json @@ -0,0 +1,156 @@ +[ + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "created_at": "2024-12-06T21:08:53.565Z", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "start_date": "2024-12-06T21:09:07Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "created_at": "2024-12-06T21:11:26.265Z", + "operation": "02a3ab84-26c6-4a79-bf89-72f877ceef8e", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "start_date": "2024-12-06T21:11:51Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "created_at": "2024-12-06T21:11:45.702Z", + "operation": "0ac72fa9-2636-4f54-b378-af6b1a070787", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "start_date": "2024-12-06T21:11:37Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "created_at": "2024-12-06T21:12:18.766Z", + "operation": "17550cd8-3e73-4e52-aa91-ab90cb3b62b0", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "start_date": "2024-12-06T21:12:13Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "created_at": "2024-12-06T21:12:42.300Z", + "operation": "17f13f4d-29b4-45f4-b025-b21f2e126771", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "start_date": "2024-12-06T21:12:40Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "created_at": "2024-12-06T21:13:06.052Z", + "operation": "1bd04128-d070-4d3a-940a-0874c4956181", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "start_date": "2024-12-06T21:13:03Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "created_at": "2024-12-06T21:13:41.375Z", + "operation": "21e70498-c4b0-4525-8443-86faa96206e3", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "start_date": "2024-12-06T21:15:00Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "4da70f32-65fd-4137-87c1-111f2daba3dd", + "created_at": "2024-12-06T21:14:06.087Z", + "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "start_date": "2024-12-06T21:14:04Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "created_at": "2024-12-06T21:14:23.612Z", + "operation": "436dd99a-cb41-4494-91c9-98ab149b557d", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "start_date": "2024-12-06T21:14:48Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "created_at": "2024-12-06T21:14:41.273Z", + "operation": "59d95661-c752-489b-9fd1-0c3fa3454dda", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "start_date": "2024-12-06T21:14:40Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", + "created_at": "2024-12-06T21:15:23.053Z", + "operation": "6d07d02a-1ad2-46ed-ad56-2f84313e98bf", + "operator": "685d581b-5698-411f-ae00-de1d97334a71", + "start_date": "2024-12-06T21:15:22Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000023", + "created_at": "2024-12-06T21:21:42.102Z", + "operation": "7d3fc7d1-0504-4ee4-a9c5-447f4b324b57", + "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", + "start_date": "2024-12-06T21:21:40Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000023", + "created_at": "2024-12-06T21:22:04.647Z", + "operation": "8563da83-0762-4d29-9b22-da5b52ef0f24", + "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", + "start_date": "2024-12-06T21:22:03Z", + "status": "Active" + } + }, + { + "model": "registration.operationdesignatedoperatortimeline", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000023", + "created_at": "2024-12-06T21:22:24.993Z", + "operation": "954c0382-ff61-4e87-a8a0-873586534b54", + "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", + "start_date": "2024-12-06T21:22:22Z", + "status": "Active" + } + } +] 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/restart_event.json b/bc_obps/registration/fixtures/mock/v1/restart_event.json new file mode 100644 index 0000000000..596bf6f6b0 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/restart_event.json @@ -0,0 +1,45 @@ +[ + { + "model": "registration.restartevent", + "pk": "1a491d98-fde9-482d-9241-0497c15dc517", + "fields": { + "created_by": "ba2ba62a121842e0942aab9e92ce8822", + "created_at": "2024-06-05T23:25:37.892Z", + "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", + "effective_date": "2024-06-05T09:00:00Z" + } + }, + { + "model": "registration.restartevent", + "pk": "a5f04108-886c-4eac-980c-f350714b099f", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000005", + "created_at": "2024-08-21T23:26:40.645Z", + "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", + "effective_date": "2025-03-05T09:00:00Z" + } + }, + { + "model": "registration.restartevent", + "pk": "1363536b-390b-4074-b691-575b678d0c70", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000003", + "created_at": "2024-06-05T23:23:08.327Z", + "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "effective_date": "2026-01-10T09:00:00Z" + } + }, + { + "model": "registration.restartevent", + "pk": "375ab674-aba4-4381-a72d-95df0e03867e", + "fields": { + "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "created_at": "2024-08-20T18:23:08.327Z", + "effective_date": "2026-01-10T09:00:00Z", + "facilities": [ + "459b80f9-b5f3-48aa-9727-90c30eaf3a58", + "f486f2fb-62ed-438d-bb3e-0819b51e3aeb" + ] + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/temporary_shutdown_event.json b/bc_obps/registration/fixtures/mock/v1/temporary_shutdown_event.json new file mode 100644 index 0000000000..79fc334ad6 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/temporary_shutdown_event.json @@ -0,0 +1,35 @@ +[ + { + "model": "registration.temporaryshutdownevent", + "fields": { + "created_by": "ba2ba62a121842e0942aab9e92ce8822", + "created_at": "2024-07-05T23:25:37.892Z", + "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", + "effective_date": "2024-08-21T09:00:00Z", + "description": "Shutting down for the day because we can't find our keys to unlock the building" + } + }, + { + "model": "registration.temporaryshutdownevent", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-08-20T18:23:08.327Z", + "effective_date": "2026-01-10T09:00:00Z", + "facilities": [ + "459b80f9-b5f3-48aa-9727-90c30eaf3a58", + "f486f2fb-62ed-438d-bb3e-0819b51e3aeb" + ], + "description": "" + } + }, + { + "model": "registration.temporaryshutdownevent", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000001", + "created_at": "2024-08-20T18:23:08.327Z", + "effective_date": "2026-01-10T09:00:00Z", + "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", + "description": "It's Pretzel Day!" + } + } +] diff --git a/bc_obps/registration/fixtures/mock/v1/transfer_event.json b/bc_obps/registration/fixtures/mock/v1/transfer_event.json new file mode 100644 index 0000000000..1587fecdf1 --- /dev/null +++ b/bc_obps/registration/fixtures/mock/v1/transfer_event.json @@ -0,0 +1,47 @@ +[ + { + "model": "registration.transferevent", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000028", + "created_at": "2024-07-05T23:25:37.892Z", + "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", + "from_operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "to_operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", + "effective_date": "2025-02-01T09:00:00Z", + "status": "To be transferred" + } + }, + { + "model": "registration.transferevent", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000028", + "created_at": "2024-07-05T23:25:37.892Z", + "updated_by": "00000000-0000-0000-0000-000000000028", + "updated_at": "2024-08-20T17:00:54.543Z", + "operation": "d99725a7-1c3a-47cb-a59b-e2388ce0fa18", + "from_operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "to_operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", + "effective_date": "2024-08-21T09:00:00Z", + "status": "Transferred" + } + }, + { + "model": "registration.transferevent", + "fields": { + "created_by": "00000000-0000-0000-0000-000000000028", + "created_at": "2024-07-05T23:25:37.892Z", + "updated_by": "00000000-0000-0000-0000-000000000028", + "updated_at": "2024-08-20T17:00:54.543Z", + "facilities": [ + "459b80f9-b5f3-48aa-9727-90c30eaf3a58", + "f486f2fb-62ed-438d-bb3e-0819b51e3aed" + ], + "from_operator": "4242ea9d-b917-4129-93c2-db00b7451051", + "to_operator": "685d581b-5698-411f-ae00-de1d97334a71", + "from_operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", + "to_operation": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", + "status": "Complete", + "effective_date": "2024-12-25T09:00:00Z" + } + } +] 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 + } + } +] From 528d81633e3a001672198a383e049f943b5de5a8 Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Wed, 18 Dec 2024 15:38:17 -0800 Subject: [PATCH 4/6] chore: fix directory --- .../management/commands/load_fixtures.py | 16 ++++++++++------ .../management/commands/load_fixtures_v1.py | 18 +++++++++++------- 2 files changed, 21 insertions(+), 13 deletions(-) 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 index 703960fd19..4c8c4f4730 100644 --- a/bc_obps/common/management/commands/load_fixtures_v1.py +++ b/bc_obps/common/management/commands/load_fixtures_v1.py @@ -9,7 +9,7 @@ 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' + 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', @@ -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 From ab96e94c3b15e70dfea59173d05f43f866b42fb7 Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Thu, 19 Dec 2024 10:33:56 -0800 Subject: [PATCH 5/6] chore: update operator fixture to test reg1 and reg2 are different --- bc_obps/registration/fixtures/mock/operator.json | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) 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 } }, { From 220956b2c467bd2280f8aabb32f468c2a58e5edd Mon Sep 17 00:00:00 2001 From: Brianna Cerkiewicz Date: Fri, 20 Dec 2024 09:48:50 -0800 Subject: [PATCH 6/6] chore: apply suggestions from code review --- bc_obps/Makefile | 2 +- .../management/commands/load_fixtures_v1.py | 7 - .../fixtures/mock/v1/closure_event.json | 27 -- .../fixtures/mock/v1/facility.json | 338 ------------------ ...acility_designated_operation_timeline.json | 236 ------------ ...peration_designated_operator_timeline.json | 156 -------- .../fixtures/mock/v1/restart_event.json | 45 --- .../mock/v1/temporary_shutdown_event.json | 35 -- .../fixtures/mock/v1/transfer_event.json | 47 --- docs/registration_part_2/data-models.md | 8 + 10 files changed, 9 insertions(+), 892 deletions(-) delete mode 100644 bc_obps/registration/fixtures/mock/v1/closure_event.json delete mode 100644 bc_obps/registration/fixtures/mock/v1/facility.json delete mode 100644 bc_obps/registration/fixtures/mock/v1/facility_designated_operation_timeline.json delete mode 100644 bc_obps/registration/fixtures/mock/v1/operation_designated_operator_timeline.json delete mode 100644 bc_obps/registration/fixtures/mock/v1/restart_event.json delete mode 100644 bc_obps/registration/fixtures/mock/v1/temporary_shutdown_event.json delete mode 100644 bc_obps/registration/fixtures/mock/v1/transfer_event.json diff --git a/bc_obps/Makefile b/bc_obps/Makefile index 3f08fa97df..895300026d 100644 --- a/bc_obps/Makefile +++ b/bc_obps/Makefile @@ -92,7 +92,7 @@ superuser: ## create a superuser superuser: $(POETRY_RUN) python $(MANAGE_PY) create_superuser -loadfixtures_v1: ## add all registration fixture files to the db +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) diff --git a/bc_obps/common/management/commands/load_fixtures_v1.py b/bc_obps/common/management/commands/load_fixtures_v1.py index 4c8c4f4730..0a1e734360 100644 --- a/bc_obps/common/management/commands/load_fixtures_v1.py +++ b/bc_obps/common/management/commands/load_fixtures_v1.py @@ -21,13 +21,6 @@ def handle(self, *args, **options): f'{fixture_base_dir}/multiple_operator.json', f'{fixture_base_dir}/document.json', f'{fixture_base_dir}/user_operator.json', - f'{fixture_base_dir}/facility.json', - f'{fixture_base_dir}/facility_designated_operation_timeline.json', - f'{fixture_base_dir}/operation_designated_operator_timeline.json', - f'{fixture_base_dir}/restart_event.json', - f'{fixture_base_dir}/closure_event.json', - f'{fixture_base_dir}/temporary_shutdown_event.json', - f'{fixture_base_dir}/transfer_event.json', f'{fixture_base_dir}/parent_operator.json', f'{fixture_base_dir}/partner_operator.json', ] diff --git a/bc_obps/registration/fixtures/mock/v1/closure_event.json b/bc_obps/registration/fixtures/mock/v1/closure_event.json deleted file mode 100644 index 7f0710ff55..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/closure_event.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "model": "registration.closureevent", - "pk": "87a669d0-66d4-47a2-9c2c-34c9e60740d0", - "fields": { - "created_by": "ba2ba62a121842e0942aab9e92ce8822", - "created_at": "2024-06-05T23:25:37.892Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "effective_date": "2024-09-01T09:00:00Z", - "description": "Homer Simpson burned the entire nuclear reactor down" - } - }, - { - "model": "registration.closureevent", - "pk": "127ccfbf-c344-4dcd-8c98-bbd9303d22a9", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-08-20T18:23:08.327Z", - "effective_date": "2026-01-10T09:00:00Z", - "facilities": [ - "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "f486f2fb-62ed-438d-bb3e-0819b51e3aeb" - ], - "description": "" - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/facility.json b/bc_obps/registration/fixtures/mock/v1/facility.json deleted file mode 100644 index 43202c8b01..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/facility.json +++ /dev/null @@ -1,338 +0,0 @@ -[ - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aeb", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 1", - "type": "Large Facility", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:18:59.623Z", - "name": "Facility 2", - "type": "Large Facility", - "address": 1, - "swrs_facility_id": 1002, - "bcghg_id": "13219990006", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aec", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 3", - "type": "Medium Facility", - "swrs_facility_id": 1003, - "bcghg_id": "13219990007", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aed", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 4", - "type": "Small Aggregate", - "swrs_facility_id": 1004, - "bcghg_id": "13219990008", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aee", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 5", - "type": "Large Facility", - "swrs_facility_id": 1005, - "bcghg_id": "13219990009", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aef", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 6", - "type": "Large Facility", - "swrs_facility_id": 1006, - "bcghg_id": "13219990010", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af0", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 7", - "type": "Large Facility", - "swrs_facility_id": 1007, - "bcghg_id": "13219990011", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af1", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 8", - "type": "Large Facility", - "swrs_facility_id": 1008, - "bcghg_id": "13219990012", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af2", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 9", - "type": "Large Facility", - "swrs_facility_id": 1009, - "bcghg_id": "13219990013", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af3", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 10", - "type": "Large Facility", - "swrs_facility_id": 1010, - "bcghg_id": "13219990014", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af4", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 11", - "type": "Large Facility", - "swrs_facility_id": 1011, - "bcghg_id": "13219990015", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af5", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 12", - "type": "Large Facility", - "swrs_facility_id": 1012, - "bcghg_id": "13219990016", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af6", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 13", - "type": "Large Facility", - "swrs_facility_id": 1013, - "bcghg_id": "13219990017", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af7", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 14", - "type": "Large Facility", - "swrs_facility_id": 1014, - "bcghg_id": "13219990018", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af8", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 15", - "type": "Large Facility", - "swrs_facility_id": 1015, - "bcghg_id": "13219990019", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3af9", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 16", - "type": "Large Facility", - "swrs_facility_id": 1016, - "bcghg_id": "13219990020", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afa", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 17", - "type": "Large Facility", - "swrs_facility_id": 1017, - "bcghg_id": "13219990021", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afb", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 18", - "type": "Large Facility", - "swrs_facility_id": 1018, - "bcghg_id": "13219990022", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afc", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 19", - "type": "Large Facility", - "swrs_facility_id": 1019, - "bcghg_id": "13219990023", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afd", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 20", - "type": "Large Facility", - "swrs_facility_id": 1020, - "bcghg_id": "13219990024", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3afe", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 21", - "type": "Large Facility", - "swrs_facility_id": 1021, - "bcghg_id": "13219990025", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "f486f2fb-62ed-438d-bb3e-0819b51e3aff", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 22", - "type": "Single Facility", - "swrs_facility_id": 1022, - "bcghg_id": "13219990026", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "459b80f9-b5f3-48aa-9727-90c30eaf3a59", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:18:59.623Z", - "name": "Facility 23", - "type": "Large Facility", - "address": 2, - "swrs_facility_id": 1023, - "bcghg_id": "13219990027", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - }, - { - "model": "registration.facility", - "pk": "4486f2fb-62ed-438d-bb3e-0819b51e3aff", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:18:07.664Z", - "name": "Facility 24", - "type": "Single Facility", - "swrs_facility_id": 1024, - "bcghg_id": "13219990999", - "latitude_of_largest_emissions": 43.5, - "longitude_of_largest_emissions": -123.5 - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/facility_designated_operation_timeline.json b/bc_obps/registration/fixtures/mock/v1/facility_designated_operation_timeline.json deleted file mode 100644 index 7af437d129..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/facility_designated_operation_timeline.json +++ /dev/null @@ -1,236 +0,0 @@ -[ - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:19:34.959Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aeb", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:32Z", - "status": "Closed" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:19:57.459Z", - "facility": "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:56Z", - "end_date": "2024-06-28T23:20:02Z", - "status": "Transferred" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:19:58.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aec", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:57Z", - "status": "Temporarily Shutdown" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:19:58.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aed", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:58Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:19:59.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aee", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:59Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:19:59.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aef", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:19:59Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:00.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af0", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:00Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:00.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af1", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:00Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:01.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af2", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:01Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:01.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af3", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:01Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:02.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af4", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:02Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:02.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af5", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:02Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:03.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af6", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:03Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:03.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af7", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:03Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:04.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af8", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:04Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:04.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3af9", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:04Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:05.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afa", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:05Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-06-05T23:20:05.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afb", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:05Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:20:06.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afd", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:06Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:20:06.500Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3afe", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "start_date": "2024-06-05T23:20:06Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-05T23:20:07.000Z", - "facility": "f486f2fb-62ed-438d-bb3e-0819b51e3aff", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "start_date": "2024-06-05T23:20:07Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-20T23:20:02Z", - "facility": "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "operation": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", - "start_date": "2024-06-28T23:20:02Z" - } - }, - { - "model": "registration.facilitydesignatedoperationtimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-06-20T23:20:02Z", - "facility": "4486f2fb-62ed-438d-bb3e-0819b51e3aff", - "operation": "1bd04128-d070-4d3a-940a-0874c4956181", - "start_date": "2024-06-28T23:20:02Z" - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/operation_designated_operator_timeline.json b/bc_obps/registration/fixtures/mock/v1/operation_designated_operator_timeline.json deleted file mode 100644 index 97631998fa..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/operation_designated_operator_timeline.json +++ /dev/null @@ -1,156 +0,0 @@ -[ - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:08:53.565Z", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:09:07Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:11:26.265Z", - "operation": "02a3ab84-26c6-4a79-bf89-72f877ceef8e", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:11:51Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:11:45.702Z", - "operation": "0ac72fa9-2636-4f54-b378-af6b1a070787", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:11:37Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:12:18.766Z", - "operation": "17550cd8-3e73-4e52-aa91-ab90cb3b62b0", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:12:13Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:12:42.300Z", - "operation": "17f13f4d-29b4-45f4-b025-b21f2e126771", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:12:40Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:13:06.052Z", - "operation": "1bd04128-d070-4d3a-940a-0874c4956181", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:13:03Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:13:41.375Z", - "operation": "21e70498-c4b0-4525-8443-86faa96206e3", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:15:00Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "4da70f32-65fd-4137-87c1-111f2daba3dd", - "created_at": "2024-12-06T21:14:06.087Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:14:04Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:14:23.612Z", - "operation": "436dd99a-cb41-4494-91c9-98ab149b557d", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:14:48Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:14:41.273Z", - "operation": "59d95661-c752-489b-9fd1-0c3fa3454dda", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:14:40Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "ba2ba62a-1218-42e0-942a-ab9e92ce8822", - "created_at": "2024-12-06T21:15:23.053Z", - "operation": "6d07d02a-1ad2-46ed-ad56-2f84313e98bf", - "operator": "685d581b-5698-411f-ae00-de1d97334a71", - "start_date": "2024-12-06T21:15:22Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000023", - "created_at": "2024-12-06T21:21:42.102Z", - "operation": "7d3fc7d1-0504-4ee4-a9c5-447f4b324b57", - "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "start_date": "2024-12-06T21:21:40Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000023", - "created_at": "2024-12-06T21:22:04.647Z", - "operation": "8563da83-0762-4d29-9b22-da5b52ef0f24", - "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "start_date": "2024-12-06T21:22:03Z", - "status": "Active" - } - }, - { - "model": "registration.operationdesignatedoperatortimeline", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000023", - "created_at": "2024-12-06T21:22:24.993Z", - "operation": "954c0382-ff61-4e87-a8a0-873586534b54", - "operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "start_date": "2024-12-06T21:22:22Z", - "status": "Active" - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/restart_event.json b/bc_obps/registration/fixtures/mock/v1/restart_event.json deleted file mode 100644 index 596bf6f6b0..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/restart_event.json +++ /dev/null @@ -1,45 +0,0 @@ -[ - { - "model": "registration.restartevent", - "pk": "1a491d98-fde9-482d-9241-0497c15dc517", - "fields": { - "created_by": "ba2ba62a121842e0942aab9e92ce8822", - "created_at": "2024-06-05T23:25:37.892Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "effective_date": "2024-06-05T09:00:00Z" - } - }, - { - "model": "registration.restartevent", - "pk": "a5f04108-886c-4eac-980c-f350714b099f", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000005", - "created_at": "2024-08-21T23:26:40.645Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "effective_date": "2025-03-05T09:00:00Z" - } - }, - { - "model": "registration.restartevent", - "pk": "1363536b-390b-4074-b691-575b678d0c70", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000003", - "created_at": "2024-06-05T23:23:08.327Z", - "operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "effective_date": "2026-01-10T09:00:00Z" - } - }, - { - "model": "registration.restartevent", - "pk": "375ab674-aba4-4381-a72d-95df0e03867e", - "fields": { - "created_by": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "created_at": "2024-08-20T18:23:08.327Z", - "effective_date": "2026-01-10T09:00:00Z", - "facilities": [ - "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "f486f2fb-62ed-438d-bb3e-0819b51e3aeb" - ] - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/temporary_shutdown_event.json b/bc_obps/registration/fixtures/mock/v1/temporary_shutdown_event.json deleted file mode 100644 index 79fc334ad6..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/temporary_shutdown_event.json +++ /dev/null @@ -1,35 +0,0 @@ -[ - { - "model": "registration.temporaryshutdownevent", - "fields": { - "created_by": "ba2ba62a121842e0942aab9e92ce8822", - "created_at": "2024-07-05T23:25:37.892Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "effective_date": "2024-08-21T09:00:00Z", - "description": "Shutting down for the day because we can't find our keys to unlock the building" - } - }, - { - "model": "registration.temporaryshutdownevent", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-08-20T18:23:08.327Z", - "effective_date": "2026-01-10T09:00:00Z", - "facilities": [ - "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "f486f2fb-62ed-438d-bb3e-0819b51e3aeb" - ], - "description": "" - } - }, - { - "model": "registration.temporaryshutdownevent", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000001", - "created_at": "2024-08-20T18:23:08.327Z", - "effective_date": "2026-01-10T09:00:00Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "description": "It's Pretzel Day!" - } - } -] diff --git a/bc_obps/registration/fixtures/mock/v1/transfer_event.json b/bc_obps/registration/fixtures/mock/v1/transfer_event.json deleted file mode 100644 index 1587fecdf1..0000000000 --- a/bc_obps/registration/fixtures/mock/v1/transfer_event.json +++ /dev/null @@ -1,47 +0,0 @@ -[ - { - "model": "registration.transferevent", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000028", - "created_at": "2024-07-05T23:25:37.892Z", - "operation": "3b5b95ea-2a1a-450d-8e2e-2e15feed96c9", - "from_operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "to_operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "effective_date": "2025-02-01T09:00:00Z", - "status": "To be transferred" - } - }, - { - "model": "registration.transferevent", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000028", - "created_at": "2024-07-05T23:25:37.892Z", - "updated_by": "00000000-0000-0000-0000-000000000028", - "updated_at": "2024-08-20T17:00:54.543Z", - "operation": "d99725a7-1c3a-47cb-a59b-e2388ce0fa18", - "from_operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "to_operator": "4a792f0f-cf9d-48c8-9a95-f504c5f84b12", - "effective_date": "2024-08-21T09:00:00Z", - "status": "Transferred" - } - }, - { - "model": "registration.transferevent", - "fields": { - "created_by": "00000000-0000-0000-0000-000000000028", - "created_at": "2024-07-05T23:25:37.892Z", - "updated_by": "00000000-0000-0000-0000-000000000028", - "updated_at": "2024-08-20T17:00:54.543Z", - "facilities": [ - "459b80f9-b5f3-48aa-9727-90c30eaf3a58", - "f486f2fb-62ed-438d-bb3e-0819b51e3aed" - ], - "from_operator": "4242ea9d-b917-4129-93c2-db00b7451051", - "to_operator": "685d581b-5698-411f-ae00-de1d97334a71", - "from_operation": "002d5a9e-32a6-4191-938c-2c02bfec592d", - "to_operation": "e1300fd7-2dee-47d1-b655-2ad3fd10f052", - "status": "Complete", - "effective_date": "2024-12-25T09:00:00Z" - } - } -] 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.