forked from soroushkavousi/fireplace-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb-initial-data.txt
105 lines (96 loc) · 14 KB
/
db-initial-data.txt
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
-- Configs
INSERT INTO public."ConfigsEntities" VALUES (0, 'DEVELOPMENT', '{"Api":{"BaseUrlPath":"http://localhost:5000","CookieMaxAgeInDays":30,"MaxRequestPerIP":180,"RequestLimitionPeriodInMinutes":60,"RedisConnectionString":"localhost:6379,password=theRedisPassword"},"File":{"BasePhysicalPath":"path/to/files","BaseUrlPath":"https://files.server.com","GeneratedFileNameLength":12},"Email":{"ActivationSubject":"Project Email Activation","ActivationMessageFormat":"Congratulations! Code: {0}"},"Google":{"ClientId":"<client-id>","ClientSecret":"<client-secret>","RelativeRedirectUrl":"/users/log-in-with-google"},"QueryResult": {"ViewLimit": 20, "DepthLimit": 4, "TotalLimit": 300}}', CURRENT_TIMESTAMP(0), NULL);
INSERT INTO public."ConfigsEntities" VALUES (1, 'PRODUCTION', '{"Api":{"BaseUrlPath":"http://api.server.com","CookieMaxAgeInDays":30,"MaxRequestPerIP":180,"RequestLimitionPeriodInMinutes":60,"RedisConnectionString":"localhost:6379,password=theRedisPassword"},"File":{"BasePhysicalPath":"path/to/files","BaseUrlPath":"https://files.server.com","GeneratedFileNameLength":12},"Email":{"ActivationSubject":"Project Email Activation","ActivationMessageFormat":"Congratulations! Code: {0}"},"Google":{"ClientId":"<client-id>","ClientSecret":"<client-secret>","RelativeRedirectUrl":"/users/log-in-with-google"},"QueryResult": {"ViewLimit": 20, "DepthLimit": 4, "TotalLimit": 300}}', CURRENT_TIMESTAMP(0), NULL);
-- Errors
INSERT INTO public."ErrorEntities" VALUES (9013, 9013, 'Request body is required!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'REQUEST_BODY');
INSERT INTO public."ErrorEntities" VALUES (9012, 9012, 'Need a search field to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'SEARCH');
INSERT INTO public."ErrorEntities" VALUES (2002, 2002, 'The user is the owner of the community and can not leave it.', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'COMMUNITY_MEMBERSHIP');
INSERT INTO public."ErrorEntities" VALUES (1000, 1000, 'Authentication Failed!', 400, CURRENT_TIMESTAMP(0), NULL, 'AUTHENTICATION_FAILED', 'GENERAL');
INSERT INTO public."ErrorEntities" VALUES (1001, 1001, 'Username and password do not match!', 400, CURRENT_TIMESTAMP(0), NULL, 'AUTHENTICATION_FAILED', 'USERNAME_AND_PASSWORD');
INSERT INTO public."ErrorEntities" VALUES (1002, 1002, 'Email and password do not match!', 400, CURRENT_TIMESTAMP(0), NULL, 'AUTHENTICATION_FAILED', 'EMAIL_AND_PASSWORD');
INSERT INTO public."ErrorEntities" VALUES (1003, 1003, 'Require a valid access token placed in headers or cookies!', 400, CURRENT_TIMESTAMP(0), NULL, 'AUTHENTICATION_FAILED', 'ACCESS_TOKEN');
INSERT INTO public."ErrorEntities" VALUES (1004, 1004, 'The user session is closed!', 400, CURRENT_TIMESTAMP(0), NULL, 'AUTHENTICATION_FAILED', 'SESSION');
INSERT INTO public."ErrorEntities" VALUES (1005, 1005, 'Require a valid csrf token placed in headers!', 400, CURRENT_TIMESTAMP(0), NULL, 'AUTHENTICATION_FAILED', 'CSRF_TOKEN');
INSERT INTO public."ErrorEntities" VALUES (2001, 2001, 'The community does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'COMMUNITY');
INSERT INTO public."ErrorEntities" VALUES (9009, 9009, 'Need a reset password code to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'RESET_PASSWORD_CODE');
INSERT INTO public."ErrorEntities" VALUES (9010, 9010, 'Need a google code to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'GOOGLE_CODE');
INSERT INTO public."ErrorEntities" VALUES (4001, 4001, 'The community name doesn''t have a valid format!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'COMMUNITY_NAME');
INSERT INTO public."ErrorEntities" VALUES (4004, 4004, 'The username should follow these rules:
1. The minimum length is 6 characters.
2. The maximum length is 30 characters.
3. The valid characters is [ a-z, A-Z, 0-9, _ ].
4. It should not start with special characters [ _ ].
5. It should not end with special characters [ _ ].
6. It should not have special characters in succession [ _ ].
', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'USERNAME');
INSERT INTO public."ErrorEntities" VALUES (4005, 4005, 'The password should follow these rules:
1. The minimum length is 8 characters.
2. It should contain at least one uppercase letter [A - Z]
3. It should contain at least one lowercase letter [a - z]
4. It should contain at least one special character (such as !, %, @, or #)
5. It should contain a numeric character [0 - 9]
', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'PASSWORD');
INSERT INTO public."ErrorEntities" VALUES (4006, 4006, 'The new password should follow these rules:
1. The minimum length is 8 characters.
2. It should contain at least one uppercase letter [A - Z]
3. It should contain at least one lowercase letter [a - z]
4. It should contain at least one special character (such as !, %, @, or #)
5. It should contain a numeric character [0 - 9]
', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'NEW_PASSWORD');
INSERT INTO public."ErrorEntities" VALUES (4015, 4015, 'The user ID or username doesn''t have a valid format!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'USER_ID_OR_USERNAME');
INSERT INTO public."ErrorEntities" VALUES (4016, 4016, 'The request body is not json!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'REQUEST_BODY');
INSERT INTO public."ErrorEntities" VALUES (6000, 6000, 'The value is not correct!', 400, CURRENT_TIMESTAMP(0), NULL, 'INCORRECT_VALUE', 'GENERAL');
INSERT INTO public."ErrorEntities" VALUES (6003, 6003, 'The activation code is not valid!', 400, CURRENT_TIMESTAMP(0), NULL, 'INCORRECT_VALUE', 'ACTIVATION_CODE');
INSERT INTO public."ErrorEntities" VALUES (3007, 3007, 'User already has a password!', 400, CURRENT_TIMESTAMP(0), NULL, 'ALREADY_EXISTS', 'PASSWORD');
INSERT INTO public."ErrorEntities" VALUES (6005, 6005, 'The sort is not valid! It should have following values: (TOP, OLD, NEW)', 400, CURRENT_TIMESTAMP(0), NULL, 'INCORRECT_VALUE', 'SORT');
INSERT INTO public."ErrorEntities" VALUES (6001, 6001, 'The password is not correct!', 400, CURRENT_TIMESTAMP(0), NULL, 'INCORRECT_VALUE', 'PASSWORD');
INSERT INTO public."ErrorEntities" VALUES (4009, 4009, 'The display name doesn''t have a valid format!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'DISPLAY_NAME');
INSERT INTO public."ErrorEntities" VALUES (4010, 4010, 'The about doesn''t have a valid format!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'ABOUT');
INSERT INTO public."ErrorEntities" VALUES (4011, 4011, 'The email address doesn''t have a valid format!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'EMAIL_ADDRESS');
INSERT INTO public."ErrorEntities" VALUES (2000, 2000, 'The item does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'GENERAL');
INSERT INTO public."ErrorEntities" VALUES (2003, 2003, 'The post does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'POST');
INSERT INTO public."ErrorEntities" VALUES (2004, 2004, 'The post vote does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'POST_VOTE');
INSERT INTO public."ErrorEntities" VALUES (2005, 2005, 'The comment does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'COMMENT');
INSERT INTO public."ErrorEntities" VALUES (2006, 2006, 'The comment vote does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'COMMENT_VOTE');
INSERT INTO public."ErrorEntities" VALUES (2007, 2007, 'The user does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'USER');
INSERT INTO public."ErrorEntities" VALUES (9001, 9001, 'Need a community name to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'COMMUNITY_NAME');
INSERT INTO public."ErrorEntities" VALUES (2008, 2008, 'The username does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'USERNAME');
INSERT INTO public."ErrorEntities" VALUES (4000, 4000, 'Invalid format error!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'GENERAL');
INSERT INTO public."ErrorEntities" VALUES (3000, 3000, 'The item already exists!', 400, CURRENT_TIMESTAMP(0), NULL, 'ALREADY_EXISTS', 'GENERAL');
INSERT INTO public."ErrorEntities" VALUES (4007, 4007, 'The avatar URL doesn''t have a valid format!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'AVATART_URL');
INSERT INTO public."ErrorEntities" VALUES (4008, 4008, 'The banner URL doesn''t have a valid format!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'BANNER_URL');
INSERT INTO public."ErrorEntities" VALUES (4002, 4002, 'The post content should follow these rules:
- The maximum length is 2000 characters.', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'POST_CONTENT');
INSERT INTO public."ErrorEntities" VALUES (4003, 4003, 'The comment content should follow these rules:
- The maximum length is 3000 characters.', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'COMMENT_CONTENT');
INSERT INTO public."ErrorEntities" VALUES (6002, 6002, 'The reset password code is not valid!', 400, CURRENT_TIMESTAMP(0), NULL, 'INCORRECT_VALUE', 'RESET_PASSWORD_CODE');
INSERT INTO public."ErrorEntities" VALUES (3001, 3001, 'The community already exists!', 400, CURRENT_TIMESTAMP(0), NULL, 'ALREADY_EXISTS', 'COMMUNITY');
INSERT INTO public."ErrorEntities" VALUES (3002, 3002, 'The community membership already exists!', 400, CURRENT_TIMESTAMP(0), NULL, 'ALREADY_EXISTS', 'COMMUNITY_MEMBERSHIP');
INSERT INTO public."ErrorEntities" VALUES (3003, 3003, 'The post vote already exists!', 400, CURRENT_TIMESTAMP(0), NULL, 'ALREADY_EXISTS', 'POST_VOTE');
INSERT INTO public."ErrorEntities" VALUES (3004, 3004, 'The comment vote already exists!', 400, CURRENT_TIMESTAMP(0), NULL, 'ALREADY_EXISTS', 'COMMENT_VOTE');
INSERT INTO public."ErrorEntities" VALUES (3005, 3005, 'The user already exists!', 400, CURRENT_TIMESTAMP(0), NULL, 'ALREADY_EXISTS', 'USER');
INSERT INTO public."ErrorEntities" VALUES (3006, 3006, 'The email already exists!', 400, CURRENT_TIMESTAMP(0), NULL, 'ALREADY_EXISTS', 'EMAIL');
INSERT INTO public."ErrorEntities" VALUES (2013, 2013, 'The error does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'ERROR');
INSERT INTO public."ErrorEntities" VALUES (2009, 2009, 'The access token does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'ACCESS_TOKEN');
INSERT INTO public."ErrorEntities" VALUES (2010, 2010, 'The session does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'SESSION');
INSERT INTO public."ErrorEntities" VALUES (2011, 2011, 'The email does not exist or access denied!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'EMAIL');
INSERT INTO public."ErrorEntities" VALUES (2012, 2012, 'User doesn''t have a password!', 400, CURRENT_TIMESTAMP(0), NULL, 'NOT_EXIST_OR_ACCESS_DENIED', 'PASSWORD');
INSERT INTO public."ErrorEntities" VALUES (4012, 4012, 'The community ID or name doesn''t have a valid format!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'COMMUNITY_ID_OR_NAME');
INSERT INTO public."ErrorEntities" VALUES (4013, 4013, 'The post ID doesn''t have a valid format!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'POST_ID');
INSERT INTO public."ErrorEntities" VALUES (4014, 4014, 'The comment ID doesn''t have a valid format!', 400, CURRENT_TIMESTAMP(0), NULL, 'INVALID_FORMAT', 'COMMENT_ID');
INSERT INTO public."ErrorEntities" VALUES (6004, 6004, 'The sort is not valid! It should have following values: (OLD, NEW)', 400, CURRENT_TIMESTAMP(0), NULL, 'INCORRECT_VALUE', 'COMMUNITY_SORT');
INSERT INTO public."ErrorEntities" VALUES (6006, 6006, 'The request content type is not valid! One example is "application/json".', 400, CURRENT_TIMESTAMP(0), NULL, 'INCORRECT_VALUE', 'REQUEST_CONTENT_TYPE');
INSERT INTO public."ErrorEntities" VALUES (5000, 5000, 'The server encountered an error and could not complete your request.', 500, CURRENT_TIMESTAMP(0), NULL, 'INTERNAL_SERVER', 'GENERAL');
INSERT INTO public."ErrorEntities" VALUES (9000, 9000, 'The field is required!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'GENERAL');
INSERT INTO public."ErrorEntities" VALUES (9011, 9011, 'Need a is_upvote field to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'IS_UPVOTE');
INSERT INTO public."ErrorEntities" VALUES (9002, 9002, 'Need a post content to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'POST_CONTENT');
INSERT INTO public."ErrorEntities" VALUES (9003, 9003, 'Need a comment content to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'COMMENT_CONTENT');
INSERT INTO public."ErrorEntities" VALUES (9004, 9004, 'Need a username to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'USERNAME');
INSERT INTO public."ErrorEntities" VALUES (9005, 9005, 'Need an email address to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'EMAIL_ADDRESS');
INSERT INTO public."ErrorEntities" VALUES (9006, 9006, 'Need an activation code to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'ACTIVATION_CODE');
INSERT INTO public."ErrorEntities" VALUES (9007, 9007, 'Need a password to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'PASSWORD');
INSERT INTO public."ErrorEntities" VALUES (9008, 9008, 'Need a new password to proceed!', 400, CURRENT_TIMESTAMP(0), NULL, 'MISSING_FIELD', 'NEW_PASSWORD');
INSERT INTO public."ErrorEntities" VALUES (8001, 8001, 'You have reached your pull rate limit. The API has a limit of 180 requests per hour for its actions.', 400, CURRENT_TIMESTAMP(0), NULL, 'LIMITATION', 'MAX_REQUEST_PER_IP');
INSERT INTO public."ErrorEntities" VALUES (8000, 8000, 'The limit is reached!', 400, CURRENT_TIMESTAMP(0), NULL, 'LIMITATION', 'GENERAL');
INSERT INTO public."ErrorEntities" VALUES (7000, 7000, 'The item is already activated!', 400, CURRENT_TIMESTAMP(0), NULL, 'ALREADY_ACTIVATED', 'GENERAL');
INSERT INTO public."ErrorEntities" VALUES (7001, 7001, 'The email is already activated!', 400, CURRENT_TIMESTAMP(0), NULL, 'ALREADY_ACTIVATED', 'EMAIL');