Skip to content

Commit

Permalink
chore: scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
ychung-mot committed Mar 25, 2024
1 parent 88ff3e8 commit 69b44ed
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 45 deletions.
105 changes: 66 additions & 39 deletions localdb/backup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,16 @@ CREATE TABLE public.dss_email_message (
email_message_type character varying(50) NOT NULL,
message_delivery_dtm timestamp with time zone NOT NULL,
message_template_dsc character varying(4000) NOT NULL,
is_host_contacted_externally boolean NOT NULL,
is_submitter_cc_required boolean NOT NULL,
message_reason_id bigint,
unreported_listing_url character varying(250),
lg_phone_no character varying(13),
unreported_listing_no character varying(25),
host_email_address_dsc character varying(320),
cc_email_address_dsc character varying(320),
lg_email_address_dsc character varying(320),
cc_email_address_dsc character varying(4000),
unreported_listing_url character varying(4000),
lg_str_bylaw_url character varying(4000),
initiating_user_identity_id bigint NOT NULL,
affected_by_user_identity_id bigint,
involved_in_organization_id bigint
Expand Down Expand Up @@ -598,24 +604,24 @@ COMMENT ON COLUMN public.dss_email_message.message_template_dsc IS 'The full tex


--
-- Name: COLUMN dss_email_message.unreported_listing_url; Type: COMMENT; Schema: public; Owner: strdssdev
-- Name: COLUMN dss_email_message.host_email_address_dsc; Type: COMMENT; Schema: public; Owner: strdssdev
--

COMMENT ON COLUMN public.dss_email_message.unreported_listing_url IS 'User-provided URL for a short-term rental platform listing that is the subject of the message';
COMMENT ON COLUMN public.dss_email_message.host_email_address_dsc IS 'E-mail address of a short term rental host (directly entered by the user as a message recipient)';


--
-- Name: COLUMN dss_email_message.host_email_address_dsc; Type: COMMENT; Schema: public; Owner: strdssdev
-- Name: COLUMN dss_email_message.cc_email_address_dsc; Type: COMMENT; Schema: public; Owner: strdssdev
--

COMMENT ON COLUMN public.dss_email_message.host_email_address_dsc IS 'E-mail address of a short term rental host (directly entered by the user as a message recipient)';
COMMENT ON COLUMN public.dss_email_message.cc_email_address_dsc IS 'E-mail address of a secondary message recipient (directly entered by the user)';


--
-- Name: COLUMN dss_email_message.cc_email_address_dsc; Type: COMMENT; Schema: public; Owner: strdssdev
-- Name: COLUMN dss_email_message.unreported_listing_url; Type: COMMENT; Schema: public; Owner: strdssdev
--

COMMENT ON COLUMN public.dss_email_message.cc_email_address_dsc IS 'E-mail address of a secondary message recipient (directly entered by the user)';
COMMENT ON COLUMN public.dss_email_message.unreported_listing_url IS 'User-provided URL for a short-term rental platform listing that is the subject of the message';


--
Expand Down Expand Up @@ -1341,7 +1347,7 @@ COPY hangfire.schema (version) FROM stdin;
--

COPY hangfire.server (id, data, lastheartbeat, updatecount) FROM stdin;
cnd2214638-n:32868:cb562633-aa87-4845-a1e9-07389794a284 {"Queues": ["default"], "StartedAt": "2024-03-25T14:39:02.5455371Z", "WorkerCount": 1} 2024-03-25 14:42:32.803899+00 0
cnd2214638-n:17896:acbd8bd9-502f-480f-b565-de9d136c842d {"Queues": ["default"], "StartedAt": "2024-03-25T15:53:58.0476485Z", "WorkerCount": 1} 2024-03-25 16:20:36.276805+00 0
\.


Expand Down Expand Up @@ -1376,7 +1382,7 @@ Approved Approved
-- Data for Name: dss_email_message; Type: TABLE DATA; Schema: public; Owner: strdssdev
--

COPY public.dss_email_message (email_message_id, email_message_type, message_delivery_dtm, message_template_dsc, message_reason_id, unreported_listing_url, host_email_address_dsc, cc_email_address_dsc, initiating_user_identity_id, affected_by_user_identity_id, involved_in_organization_id) FROM stdin;
COPY public.dss_email_message (email_message_id, email_message_type, message_delivery_dtm, message_template_dsc, is_host_contacted_externally, is_submitter_cc_required, message_reason_id, lg_phone_no, unreported_listing_no, host_email_address_dsc, lg_email_address_dsc, cc_email_address_dsc, unreported_listing_url, lg_str_bylaw_url, initiating_user_identity_id, affected_by_user_identity_id, involved_in_organization_id) FROM stdin;
\.


Expand All @@ -1385,12 +1391,12 @@ COPY public.dss_email_message (email_message_id, email_message_type, message_del
--

COPY public.dss_email_message_type (email_message_type, email_message_type_nm) FROM stdin;
Access Granted Notification Access Granted Notification
Delisting Warning Delisting Warning
Compliance Order Provincial Compliance Order
Access Granted Access Granted Notification
Escalation Request STR Escalation Request
Takedown Request Takedown Request
Delisting Request Delisting Request
Access Denied Notification Access Denied Notification
Notice of Takedown Notice of Takedown
Access Denied Access Denied Notification
Notice of Takedown Notice of Takedown of Short Term Rental Platform Offer
\.


Expand All @@ -1413,10 +1419,10 @@ COPY public.dss_message_reason (message_reason_id, email_message_type, message_r
--

COPY public.dss_organization (organization_id, organization_type, organization_cd, organization_nm, local_government_geometry, managing_organization_id, upd_dtm, upd_user_guid) FROM stdin;
1 LG LGTEST Test Town \N \N 2024-03-21 21:39:51.605194+00 \N
2 Platform PLATFORMTEST Test Platform \N \N 2024-03-21 21:39:51.605194+00 \N
3 BCGov BC Other BC Government Components \N \N 2024-03-21 21:39:51.605194+00 \N
4 BCGov CEU Compliance Enforcement Unit \N \N 2024-03-21 21:39:51.605194+00 \N
1 LG LGTEST Test Town \N \N 2024-03-25 16:21:48.115257+00 \N
2 Platform PLATFORMTEST Test Platform \N \N 2024-03-25 16:21:48.115257+00 \N
3 BCGov BC Other BC Government Components \N \N 2024-03-25 16:21:48.115257+00 \N
4 BCGov CEU Compliance Enforcement Unit \N \N 2024-03-25 16:21:48.115257+00 \N
\.


Expand All @@ -1425,7 +1431,7 @@ COPY public.dss_organization (organization_id, organization_type, organization_c
--

COPY public.dss_organization_contact_person (organization_contact_person_id, is_primary, given_nm, family_nm, phone_no, email_address_dsc, contacted_through_organization_id, upd_dtm, upd_user_guid) FROM stdin;
1 t John Doe young-jin.chung@gov.bc.ca 2 2024-03-21 22:44:35.886492+00 \N
1 t John Doe young-jin.chung@dxcas.com 2 2024-03-25 16:25:03.665664+00 550e8400-e29b-41d4-a716-446655440014
\.


Expand All @@ -1445,22 +1451,21 @@ LG Local Government
--

COPY public.dss_user_identity (user_identity_id, user_guid, display_nm, identity_provider_nm, is_enabled, access_request_status_cd, access_request_dtm, access_request_justification_txt, given_nm, family_nm, email_address_dsc, business_nm, terms_acceptance_dtm, represented_by_organization_id, upd_dtm, upd_user_guid) FROM stdin;
1 bc3577d3-f3f8-4687-a093-4594fa43f679 Chung, Young-Jin MOTI:EX idir f Requested 2024-03-21 21:40:03.609764+00 BCGov, Ministry of Housing Young-Jin Chung young-jin.chung@gov.bc.ca \N \N 2024-03-21 21:40:03.740868+00 bc3577d3-f3f8-4687-a093-4594fa43f679
17 550e8400-e29b-41d4-a716-446655440000 User1 Display Name idir f Requested \N BCGov, Ministry of Housing User1 Given Name User1 Family Name user1@example.com User1 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
18 550e8400-e29b-41d4-a716-446655440001 User2 Display Name idir f Requested \N BCGov, Ministry of Housing User2 Given Name User2 Family Name user2@example.com User2 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
19 550e8400-e29b-41d4-a716-446655440002 User3 Display Name idir f Requested \N BCGov, Ministry of Housing User3 Given Name User3 Family Name user3@example.com User3 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
20 550e8400-e29b-41d4-a716-446655440003 User4 Display Name idir f Requested \N BCGov, Ministry of Housing User4 Given Name User4 Family Name user4@example.com User4 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
21 550e8400-e29b-41d4-a716-446655440004 User5 Display Name idir f Requested \N BCGov, Ministry of Housing User5 Given Name User5 Family Name user5@example.com User5 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
22 550e8400-e29b-41d4-a716-446655440005 User6 Display Name idir f Requested \N BCGov, Ministry of Housing User6 Given Name User6 Family Name user6@example.com User6 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
23 550e8400-e29b-41d4-a716-446655440006 User7 Display Name idir f Requested \N BCGov, Ministry of Housing User7 Given Name User7 Family Name user7@example.com User7 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
24 550e8400-e29b-41d4-a716-446655440007 User8 Display Name idir f Requested \N BCGov, Ministry of Housing User8 Given Name User8 Family Name user8@example.com User8 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
25 550e8400-e29b-41d4-a716-446655440008 User9 Display Name idir f Requested \N BCGov, Ministry of Housing User9 Given Name User9 Family Name user9@example.com User9 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
26 550e8400-e29b-41d4-a716-446655440009 User10 Display Name idir f Requested \N BCGov, Ministry of Housing User10 Given Name User10 Family Name user10@example.com User10 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
27 550e8400-e29b-41d4-a716-446655440010 User11 Display Name idir f Requested \N BCGov, Ministry of Housing User11 Given Name User11 Family Name user11@example.com User11 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
28 550e8400-e29b-41d4-a716-446655440011 User12 Display Name idir f Requested \N BCGov, Ministry of Housing User12 Given Name User12 Family Name user12@example.com User12 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
29 550e8400-e29b-41d4-a716-446655440012 User13 Display Name idir f Requested \N BCGov, Ministry of Housing User13 Given Name User13 Family Name user13@example.com User13 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
30 550e8400-e29b-41d4-a716-446655440013 User14 Display Name idir f Requested \N BCGov, Ministry of Housing User14 Given Name User14 Family Name user14@example.com User14 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
31 550e8400-e29b-41d4-a716-446655440014 User15 Display Name idir f Requested \N BCGov, Ministry of Housing User15 Given Name User15 Family Name user15@example.com User15 Business Name \N \N 2024-03-25 15:51:13.104408+00 \N
1 550e8400-e29b-41d4-a716-446655440000 User1 Display Name idir f Requested \N BCGov, Ministry of Housing User1 Given Name User1 Family Name user1@example.com User1 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
2 550e8400-e29b-41d4-a716-446655440001 User2 Display Name idir f Requested \N BCGov, Ministry of Housing User2 Given Name User2 Family Name user2@example.com User2 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
3 550e8400-e29b-41d4-a716-446655440002 User3 Display Name idir f Requested \N BCGov, Ministry of Housing User3 Given Name User3 Family Name user3@example.com User3 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
4 550e8400-e29b-41d4-a716-446655440003 User4 Display Name idir f Requested \N BCGov, Ministry of Housing User4 Given Name User4 Family Name user4@example.com User4 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
5 550e8400-e29b-41d4-a716-446655440004 User5 Display Name idir f Requested \N BCGov, Ministry of Housing User5 Given Name User5 Family Name user5@example.com User5 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
6 550e8400-e29b-41d4-a716-446655440005 User6 Display Name idir f Requested \N BCGov, Ministry of Housing User6 Given Name User6 Family Name user6@example.com User6 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
7 550e8400-e29b-41d4-a716-446655440006 User7 Display Name idir f Requested \N BCGov, Ministry of Housing User7 Given Name User7 Family Name user7@example.com User7 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
8 550e8400-e29b-41d4-a716-446655440007 User8 Display Name idir f Requested \N BCGov, Ministry of Housing User8 Given Name User8 Family Name user8@example.com User8 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
9 550e8400-e29b-41d4-a716-446655440008 User9 Display Name idir f Requested \N BCGov, Ministry of Housing User9 Given Name User9 Family Name user9@example.com User9 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
10 550e8400-e29b-41d4-a716-446655440009 User10 Display Name idir f Requested \N BCGov, Ministry of Housing User10 Given Name User10 Family Name user10@example.com User10 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
11 550e8400-e29b-41d4-a716-446655440010 User11 Display Name idir f Requested \N BCGov, Ministry of Housing User11 Given Name User11 Family Name user11@example.com User11 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
12 550e8400-e29b-41d4-a716-446655440011 User12 Display Name idir f Requested \N BCGov, Ministry of Housing User12 Given Name User12 Family Name user12@example.com User12 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
13 550e8400-e29b-41d4-a716-446655440012 User13 Display Name idir f Requested \N BCGov, Ministry of Housing User13 Given Name User13 Family Name user13@example.com User13 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
14 550e8400-e29b-41d4-a716-446655440013 User14 Display Name idir f Requested \N BCGov, Ministry of Housing User14 Given Name User14 Family Name user14@example.com User14 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
15 550e8400-e29b-41d4-a716-446655440014 User15 Display Name idir f Requested \N BCGov, Ministry of Housing User15 Given Name User15 Family Name user15@example.com User15 Business Name \N \N 2024-03-25 16:23:00.821534+00 \N
\.


Expand All @@ -1469,7 +1474,14 @@ COPY public.dss_user_identity (user_identity_id, user_guid, display_nm, identity
--

COPY public.dss_user_privilege (user_privilege_cd, user_privilege_nm) FROM stdin;
takedown_action_write Create Takedown Action
user_read View users
listing_read View listings
ceu_action Create CEU Action
takedown_action Create Takedown Action
user_write Manage users
listing_file_upload Upload platform listing files
licence_file_upload Upload business licence files
audit_read View audit logs
\.


Expand Down Expand Up @@ -1499,7 +1511,22 @@ COPY public.dss_user_role_assignment (user_identity_id, user_role_cd) FROM stdin
--

COPY public.dss_user_role_privilege (user_privilege_cd, user_role_cd) FROM stdin;
takedown_action_write ceu_admin
ceu_action ceu_staff
audit_read bc_staff
ceu_action ceu_admin
listing_read lg_staff
takedown_action lg_staff
listing_read ceu_admin
user_read ceu_admin
listing_read ceu_staff
licence_file_upload ceu_admin
audit_read ceu_staff
listing_file_upload ceu_admin
listing_read bc_staff
user_write ceu_admin
licence_file_upload lg_staff
listing_file_upload platform_staff
audit_read lg_staff
\.


Expand Down Expand Up @@ -1606,7 +1633,7 @@ SELECT pg_catalog.setval('public.dss_organization_organization_id_seq', 4, true)
-- Name: dss_user_identity_user_identity_id_seq; Type: SEQUENCE SET; Schema: public; Owner: strdssdev
--

SELECT pg_catalog.setval('public.dss_user_identity_user_identity_id_seq', 31, true);
SELECT pg_catalog.setval('public.dss_user_identity_user_identity_id_seq', 15, true);


--
Expand Down
18 changes: 16 additions & 2 deletions server/StrDss.Data/Entities/DssDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasComment("Foreign key")
.HasColumnName("affected_by_user_identity_id");
entity.Property(e => e.CcEmailAddressDsc)
.HasMaxLength(320)
.HasMaxLength(4000)
.HasComment("E-mail address of a secondary message recipient (directly entered by the user)")
.HasColumnName("cc_email_address_dsc");
entity.Property(e => e.EmailMessageType)
Expand All @@ -80,6 +80,17 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.InvolvedInOrganizationId)
.HasComment("Foreign key")
.HasColumnName("involved_in_organization_id");
entity.Property(e => e.IsHostContactedExternally).HasColumnName("is_host_contacted_externally");
entity.Property(e => e.IsSubmitterCcRequired).HasColumnName("is_submitter_cc_required");
entity.Property(e => e.LgEmailAddressDsc)
.HasMaxLength(320)
.HasColumnName("lg_email_address_dsc");
entity.Property(e => e.LgPhoneNo)
.HasMaxLength(13)
.HasColumnName("lg_phone_no");
entity.Property(e => e.LgStrBylawUrl)
.HasMaxLength(4000)
.HasColumnName("lg_str_bylaw_url");
entity.Property(e => e.MessageDeliveryDtm)
.HasComment("A timestamp indicating when the message delivery was initiated")
.HasColumnName("message_delivery_dtm");
Expand All @@ -88,8 +99,11 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.HasMaxLength(4000)
.HasComment("The full text or template for the message that is sent")
.HasColumnName("message_template_dsc");
entity.Property(e => e.UnreportedListingNo)
.HasMaxLength(25)
.HasColumnName("unreported_listing_no");
entity.Property(e => e.UnreportedListingUrl)
.HasMaxLength(250)
.HasMaxLength(4000)
.HasComment("User-provided URL for a short-term rental platform listing that is the subject of the message")
.HasColumnName("unreported_listing_url");
Expand Down
20 changes: 16 additions & 4 deletions server/StrDss.Data/Entities/DssEmailMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,35 @@ public partial class DssEmailMessage
/// </summary>
public string MessageTemplateDsc { get; set; } = null!;

public bool IsHostContactedExternally { get; set; }

public bool IsSubmitterCcRequired { get; set; }

public long? MessageReasonId { get; set; }

/// <summary>
/// User-provided URL for a short-term rental platform listing that is the subject of the message
/// </summary>
public string? UnreportedListingUrl { get; set; }
public string? LgPhoneNo { get; set; }

public string? UnreportedListingNo { get; set; }

/// <summary>
/// E-mail address of a short term rental host (directly entered by the user as a message recipient)
/// </summary>
public string? HostEmailAddressDsc { get; set; }

public string? LgEmailAddressDsc { get; set; }

/// <summary>
/// E-mail address of a secondary message recipient (directly entered by the user)
/// </summary>
public string? CcEmailAddressDsc { get; set; }

/// <summary>
/// User-provided URL for a short-term rental platform listing that is the subject of the message
/// </summary>
public string? UnreportedListingUrl { get; set; }

public string? LgStrBylawUrl { get; set; }

/// <summary>
/// Foreign key
/// </summary>
Expand Down

0 comments on commit 69b44ed

Please sign in to comment.