forked from kgrzybek/modular-monolith-with-ddd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SeedDatabase.sql
181 lines (167 loc) · 7.31 KB
/
SeedDatabase.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
-- Add Test Member
INSERT INTO users.UserRegistrations VALUES
(
'2EBFECFC-ED13-43B8-B516-6AC89D51C510',
'testMember@mail.com',
'testMember@mail.com',
'ANO7TKjxh/Dom6LG0dyoQfJciLca+e1itHQ6BZMQYs+aMbKL9MjCv6bq4gy4+MRY0w==', -- testMemberPass
'John',
'Doe',
'John Doe',
'Confirmed',
GETDATE(),
GETDATE()
)
INSERT INTO users.Users VALUES
(
'2EBFECFC-ED13-43B8-B516-6AC89D51C510',
'testMember@mail.com',
'testMember@mail.com',
'ANO7TKjxh/Dom6LG0dyoQfJciLca+e1itHQ6BZMQYs+aMbKL9MjCv6bq4gy4+MRY0w==', -- testMemberPass
1,
'John',
'Doe',
'John Doe'
)
INSERT INTO meetings.Members VALUES
(
'2EBFECFC-ED13-43B8-B516-6AC89D51C510',
'testMember@mail.com',
'testMember@mail.com',
'John',
'Doe',
'John Doe'
)
INSERT INTO payments.Payers VALUES
(
'2EBFECFC-ED13-43B8-B516-6AC89D51C510',
'testMember@mail.com',
'testMember@mail.com',
'John',
'Doe',
'John Doe'
)
INSERT INTO users.UserRoles VALUES
('2EBFECFC-ED13-43B8-B516-6AC89D51C510', 'Member')
-- Add Test Administrator
INSERT INTO users.UserRegistrations VALUES
(
'4065630E-4A4C-4F01-9142-0BACF6B8C64D',
'testAdmin@mail.com',
'testAdmin@mail.com',
'AK0qplH5peUHwnCVuzW9zy0JGZTTG6/Ji88twX+nw9JdTUwqa3Wol1K4m5aCG9pE2A==', -- testAdminPass
'Jane',
'Doe',
'Jane Doe',
'Confirmed',
GETDATE(),
GETDATE()
)
INSERT INTO users.Users VALUES
(
'4065630E-4A4C-4F01-9142-0BACF6B8C64D',
'testAdmin@mail.com',
'testAdmin@mail.com',
'AK0qplH5peUHwnCVuzW9zy0JGZTTG6/Ji88twX+nw9JdTUwqa3Wol1K4m5aCG9pE2A==', -- testAdminPass
1,
'Jane',
'Doe',
'Jane Doe'
)
INSERT INTO users.UserRoles VALUES
('4065630E-4A4C-4F01-9142-0BACF6B8C64D', 'Administrator')
-- Roles to Permissions
INSERT INTO users.[Permissions] ([Code], [Name]) VALUES
-- Meetings
('GetMeetingGroupProposals', 'GetMeetingGroupProposals'),
('ProposeMeetingGroup', 'ProposeMeetingGroup'),
('CreateNewMeeting','CreateNewMeeting'),
('EditMeeting','EditMeeting'),
('AddMeetingAttendee','AddMeetingAttendee'),
('RemoveMeetingAttendee','RemoveMeetingAttendee'),
('AddNotAttendee','AddNotAttendee'),
('ChangeNotAttendeeDecision','ChangeNotAttendeeDecision'),
('SignUpMemberToWaitlist','SignUpMemberToWaitlist'),
('SignOffMemberFromWaitlist','SignOffMemberFromWaitlist'),
('SetMeetingHostRole','SetMeetingHostRole'),
('SetMeetingAttendeeRole','SetMeetingAttendeeRole'),
('CancelMeeting','CancelMeeting'),
('GetAllMeetingGroups','GetAllMeetingGroups'),
('EditMeetingGroupGeneralAttributes','EditMeetingGroupGeneralAttributes'),
('JoinToGroup','JoinToGroup'),
('LeaveMeetingGroup','LeaveMeetingGroup'),
('AddMeetingComment','AddMeetingComment'),
('EditMeetingComment','EditMeetingComment'),
('RemoveMeetingComment','RemoveMeetingComment'),
('AddMeetingCommentReply','AddMeetingCommentReply'),
('LikeMeetingComment','LikeMeetingComment'),
('UnlikeMeetingComment','UnlikeMeetingComment'),
('EnableMeetingCommenting','EnableMeetingCommenting'),
('DisableMeetingCommenting','DisableMeetingCommenting'),
('MyMeetingGroupsView','MyMeetingGroupsView'),
('AllMeetingGroupsView','AllMeetingGroupsView'),
('SubscriptionView','SubscriptionView'),
('EmailsView','EmailsView'),
('MyMeetingsView','MyMeetingsView'),
('GetAuthenticatedMemberMeetings','GetAuthenticatedMemberMeetings'),
-- Administration
('AcceptMeetingGroupProposal','AcceptMeetingGroupProposal'),
('AdministrationsView','AdministrationsView'),
-- Payments
('RegisterPayment','RegisterPayment'),
('BuySubscription','BuySubscription'),
('RenewSubscription','RenewSubscription'),
('CreatePriceListItem','CreatePriceListItem'),
('ActivatePriceListItem','ActivatePriceListItem'),
('DeactivatePriceListItem','DeactivatePriceListItem'),
('ChangePriceListItemAttributes','ChangePriceListItemAttributes'),
('GetAuthenticatedPayerSubscription','GetAuthenticatedPayerSubscription'),
('GetPriceListItem','GetPriceListItem')
-- Meetings
INSERT INTO users.RolesToPermissions VALUES ('Member', 'GetMeetingGroupProposals')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'ProposeMeetingGroup')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'CreateNewMeeting')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'EditMeeting')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'AddMeetingAttendee')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'RemoveMeetingAttendee')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'AddNotAttendee')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'ChangeNotAttendeeDecision')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'SignUpMemberToWaitlist')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'SignOffMemberFromWaitlist')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'SetMeetingHostRole')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'SetMeetingAttendeeRole')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'CancelMeeting')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'GetAllMeetingGroups')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'EditMeetingGroupGeneralAttributes')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'JoinToGroup')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'LeaveMeetingGroup')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'AddMeetingComment')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'EditMeetingComment')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'RemoveMeetingComment')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'AddMeetingCommentReply')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'LikeMeetingComment')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'UnlikeMeetingComment')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'GetAuthenticatedMemberMeetingGroups')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'GetMeetingGroupDetails')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'GetMeetingDetails')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'GetMeetingAttendees')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'MyMeetingsGroupsView')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'SubscriptionView')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'EmailsView')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'AllMeetingGroupsView')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'MyMeetingsView')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'GetAuthenticatedMemberMeetings')
-- Administration
INSERT INTO users.RolesToPermissions VALUES ('Administrator', 'AcceptMeetingGroupProposal')
INSERT INTO users.RolesToPermissions VALUES ('Administrator', 'AdministrationsView')
-- Payments
INSERT INTO users.RolesToPermissions VALUES ('Member', 'RegisterPayment')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'BuySubscription')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'RenewSubscription')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'GetAuthenticatedPayerSubscription')
INSERT INTO users.RolesToPermissions VALUES ('Member', 'GetPriceListItem')
INSERT INTO users.RolesToPermissions VALUES ('Administrator', 'CreatePriceListItem')
INSERT INTO users.RolesToPermissions VALUES ('Administrator', 'ActivatePriceListItem')
INSERT INTO users.RolesToPermissions VALUES ('Administrator', 'DeactivatePriceListItem')
INSERT INTO users.RolesToPermissions VALUES ('Administrator', 'ChangePriceListItemAttributes')
INSERT INTO users.RolesToPermissions VALUES ('Administrator', 'GetPriceListItem')