Skip to content

Commit

Permalink
[Fix]: bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bayy1216 committed Jun 1, 2024
1 parent 4c3a6f5 commit 2a44c31
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 51 deletions.
2 changes: 1 addition & 1 deletion utils/node/make.user.challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ for (let i = 0; i < 50; i++) {
const userId = faker.number.int({ min: 1, max: 20 });
const createdAt = faker.date.past().toISOString().slice(0, 19).replace('T', ' ');
const lastModifiedAt = faker.date.recent().toISOString().slice(0, 19).replace('T', ' ');
const statuses = ['FINISHED', 'PROCEEDING'];
const statuses = ['PROCEEDING', 'SUCCESS', 'FAIL'];
const status = statuses[Math.floor(Math.random() * statuses.length)];

const sql = `(${challengeId}, '${createdAt}', '${lastModifiedAt}', ${userId}, '${status}'),`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ public enum ChallengeStatus {
SUCCESS("성공"),
FAIL("실패");

public boolean isProceeding() {
return this == PROCEEDING;
}

private final String korean;
}
101 changes: 51 additions & 50 deletions zzansuni-api-server/app/src/main/resources/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -190,56 +190,57 @@ VALUES (3, 50, 10, 500, 1, '2023-05-31 10:00:00', '2023-05-31 12:00:00', 'DAY'),
* 유저 챌린지 50개 INSERT
*/
INSERT INTO user_challenge (challenge_id, created_at, last_modified_at, user_id, status)
VALUES (40, '2023-06-15 14:25:08', '2024-05-31 02:08:53', 4, 'PROCEEDING'),
(27, '2023-07-10 05:25:51', '2024-05-30 08:28:47', 9, 'FINISHED'),
(39, '2024-05-13 09:04:42', '2024-05-31 02:07:37', 6, 'FINISHED'),
(37, '2023-06-28 15:58:39', '2024-05-31 04:56:29', 1, 'PROCEEDING'),
(15, '2024-03-29 18:50:40', '2024-05-30 13:44:48', 20, 'FINISHED'),
(36, '2023-08-19 17:38:12', '2024-05-31 00:06:59', 17, 'FINISHED'),
(8, '2024-04-25 18:04:42', '2024-05-30 22:02:59', 3, 'FINISHED'),
(40, '2023-12-17 04:38:17', '2024-05-30 16:32:09', 17, 'FINISHED'),
(7, '2024-03-11 11:07:16', '2024-05-30 20:38:05', 14, 'FINISHED'),
(27, '2023-12-12 05:08:36', '2024-05-30 10:30:26', 1, 'PROCEEDING'),
(32, '2024-05-22 09:27:40', '2024-05-30 12:18:33', 17, 'PROCEEDING'),
(35, '2023-07-31 20:04:40', '2024-05-30 22:23:44', 19, 'FINISHED'),
(10, '2023-09-12 06:33:45', '2024-05-30 16:58:55', 8, 'FINISHED'),
(29, '2024-05-24 16:40:14', '2024-05-30 13:03:05', 12, 'FINISHED'),
(22, '2023-12-13 08:29:47', '2024-05-31 05:42:21', 5, 'PROCEEDING'),
(20, '2024-03-14 20:46:26', '2024-05-30 23:36:55', 17, 'FINISHED'),
(32, '2023-12-15 02:11:54', '2024-05-31 00:50:03', 15, 'FINISHED'),
(16, '2023-09-14 09:13:43', '2024-05-30 08:30:02', 20, 'PROCEEDING'),
(28, '2024-01-12 07:17:07', '2024-05-31 02:18:18', 8, 'FINISHED'),
(23, '2024-05-18 07:01:54', '2024-05-31 05:07:58', 12, 'FINISHED'),
(27, '2023-12-27 08:25:00', '2024-05-30 11:58:59', 9, 'FINISHED'),
(5, '2024-05-20 21:45:54', '2024-05-30 18:34:39', 19, 'PROCEEDING'),
(8, '2023-11-08 08:11:12', '2024-05-31 00:32:59', 16, 'FINISHED'),
(27, '2023-06-19 21:06:38', '2024-05-30 20:34:43', 2, 'FINISHED'),
(24, '2023-12-23 21:38:03', '2024-05-30 13:03:59', 11, 'FINISHED'),
(21, '2023-10-08 01:23:17', '2024-05-31 00:32:22', 11, 'FINISHED'),
(18, '2023-07-15 16:32:54', '2024-05-30 23:09:33', 16, 'PROCEEDING'),
(34, '2024-04-21 03:04:42', '2024-05-30 23:59:12', 13, 'FINISHED'),
(12, '2024-03-20 22:14:53', '2024-05-30 11:20:51', 2, 'FINISHED'),
(10, '2023-08-19 00:28:55', '2024-05-30 16:07:23', 18, 'FINISHED'),
(12, '2024-02-17 00:18:48', '2024-05-30 21:54:43', 9, 'PROCEEDING'),
(32, '2024-04-07 14:04:16', '2024-05-31 07:24:12', 10, 'PROCEEDING'),
(27, '2023-07-01 14:45:02', '2024-05-30 23:35:29', 20, 'PROCEEDING'),
(11, '2024-01-01 14:26:42', '2024-05-30 08:37:10', 19, 'FINISHED'),
(32, '2023-12-18 12:48:58', '2024-05-30 22:59:55', 5, 'PROCEEDING'),
(21, '2023-12-01 23:14:31', '2024-05-30 23:45:27', 1, 'PROCEEDING'),
(30, '2023-12-04 13:50:14', '2024-05-31 04:04:12', 11, 'FINISHED'),
(16, '2023-07-29 02:41:34', '2024-05-30 18:13:54', 14, 'FINISHED'),
(19, '2023-12-27 14:48:23', '2024-05-30 20:36:29', 13, 'FINISHED'),
(14, '2023-07-02 00:35:53', '2024-05-31 04:12:08', 17, 'FINISHED'),
(17, '2024-01-21 08:44:34', '2024-05-30 11:40:59', 6, 'PROCEEDING'),
(1, '2023-12-21 03:34:42', '2024-05-30 22:58:59', 6, 'PROCEEDING'),
(17, '2024-05-21 17:15:30', '2024-05-30 13:31:47', 16, 'PROCEEDING'),
(28, '2024-05-05 04:30:55', '2024-05-30 17:08:14', 12, 'PROCEEDING'),
(10, '2024-05-10 01:33:15', '2024-05-30 23:31:08', 9, 'FINISHED'),
(19, '2023-07-26 20:32:49', '2024-05-31 04:22:20', 11, 'PROCEEDING'),
(4, '2024-04-05 11:31:12', '2024-05-30 08:34:44', 13, 'PROCEEDING'),
(2, '2023-12-21 06:54:35', '2024-05-30 10:22:00', 3, 'FINISHED'),
(23, '2023-06-03 05:30:40', '2024-05-31 00:00:26', 1, 'PROCEEDING'),
(35, '2023-09-07 06:52:12', '2024-05-31 00:50:56', 19, 'PROCEEDING');
VALUES
(23, '2024-04-17 00:59:51', '2024-05-31 20:01:57', 19, 'PROCEEDING'),
(35, '2023-11-06 10:28:46', '2024-05-31 14:27:59', 20, 'SUCCESS'),
(27, '2023-12-26 19:29:33', '2024-05-31 12:47:58', 14, 'PROCEEDING'),
(32, '2023-11-06 22:11:18', '2024-05-31 18:35:06', 1, 'FAIL'),
(21, '2023-11-03 04:22:11', '2024-05-31 23:15:25', 8, 'PROCEEDING'),
(2, '2024-02-08 13:51:31', '2024-05-31 21:22:24', 7, 'PROCEEDING'),
(25, '2023-12-02 16:11:27', '2024-05-31 13:44:19', 16, 'FAIL'),
(29, '2024-05-13 11:18:07', '2024-06-01 01:27:26', 2, 'FAIL'),
(14, '2023-11-08 09:13:38', '2024-05-31 23:47:19', 13, 'SUCCESS'),
(5, '2024-05-21 02:32:20', '2024-06-01 02:59:40', 11, 'SUCCESS'),
(9, '2024-04-16 12:43:09', '2024-06-01 03:07:21', 2, 'PROCEEDING'),
(30, '2023-09-22 09:02:08', '2024-05-31 15:56:47', 16, 'FAIL'),
(31, '2023-06-10 12:54:44', '2024-06-01 02:40:54', 3, 'PROCEEDING'),
(12, '2023-12-29 15:40:16', '2024-05-31 10:58:46', 5, 'PROCEEDING'),
(14, '2023-11-23 20:16:06', '2024-05-31 10:30:09', 17, 'FAIL'),
(32, '2023-07-01 22:11:32', '2024-05-31 07:12:12', 1, 'FAIL'),
(40, '2024-03-26 19:06:37', '2024-05-31 23:29:29', 12, 'SUCCESS'),
(18, '2024-02-27 09:47:32', '2024-05-31 16:05:36', 16, 'PROCEEDING'),
(2, '2024-05-25 21:56:45', '2024-05-31 13:13:29', 7, 'PROCEEDING'),
(21, '2023-11-28 07:29:39', '2024-06-01 03:20:59', 5, 'PROCEEDING'),
(36, '2023-10-16 14:10:18', '2024-05-31 17:27:43', 19, 'FAIL'),
(37, '2023-07-04 08:19:40', '2024-05-31 08:54:08', 17, 'SUCCESS'),
(34, '2024-02-13 11:06:11', '2024-05-31 14:47:56', 1, 'FAIL'),
(40, '2023-06-30 06:53:36', '2024-06-01 03:00:23', 13, 'SUCCESS'),
(21, '2023-06-05 20:04:34', '2024-05-31 22:17:43', 13, 'SUCCESS'),
(40, '2024-03-31 04:30:25', '2024-05-31 11:31:29', 5, 'PROCEEDING'),
(21, '2023-10-30 21:45:56', '2024-06-01 00:34:50', 3, 'FAIL'),
(32, '2023-09-16 11:04:44', '2024-06-01 06:16:46', 5, 'SUCCESS'),
(37, '2023-12-18 18:21:08', '2024-05-31 15:24:21', 5, 'SUCCESS'),
(30, '2024-02-04 08:22:41', '2024-06-01 02:36:46', 17, 'PROCEEDING'),
(13, '2023-09-18 13:06:33', '2024-05-31 09:07:34', 9, 'FAIL'),
(30, '2024-02-14 15:40:11', '2024-05-31 16:10:40', 19, 'FAIL'),
(39, '2024-03-05 05:49:58', '2024-05-31 12:33:58', 17, 'FAIL'),
(3, '2023-07-16 08:49:35', '2024-06-01 01:11:38', 15, 'PROCEEDING'),
(18, '2023-06-25 19:39:12', '2024-06-01 04:26:02', 2, 'PROCEEDING'),
(1, '2024-03-28 13:31:21', '2024-06-01 06:23:23', 9, 'PROCEEDING'),
(36, '2023-09-04 19:33:05', '2024-05-31 21:56:36', 8, 'PROCEEDING'),
(25, '2023-06-26 10:41:27', '2024-06-01 00:08:53', 17, 'SUCCESS'),
(10, '2023-12-12 23:50:50', '2024-06-01 06:20:09', 12, 'PROCEEDING'),
(10, '2024-01-08 11:08:49', '2024-05-31 09:43:11', 10, 'PROCEEDING'),
(12, '2024-04-11 22:59:11', '2024-05-31 23:15:53', 4, 'FAIL'),
(35, '2024-04-10 09:04:26', '2024-05-31 15:10:54', 20, 'PROCEEDING'),
(34, '2023-07-21 16:26:14', '2024-05-31 12:50:30', 7, 'PROCEEDING'),
(23, '2023-09-19 07:24:03', '2024-05-31 08:33:48', 1, 'PROCEEDING'),
(35, '2023-12-25 03:56:47', '2024-05-31 19:04:40', 16, 'PROCEEDING'),
(37, '2023-07-21 18:49:30', '2024-05-31 13:18:06', 2, 'FAIL'),
(30, '2024-01-13 10:30:28', '2024-06-01 04:13:24', 3, 'FAIL'),
(29, '2024-03-17 06:41:06', '2024-05-31 15:59:43', 15, 'SUCCESS'),
(5, '2024-05-13 01:25:34', '2024-05-31 09:03:49', 8, 'SUCCESS'),
(5, '2023-08-27 06:24:49', '2024-05-31 13:45:58', 18, 'SUCCESS');
/**
* 챌린지 리뷰 50개 INSERT
Expand Down

0 comments on commit 2a44c31

Please sign in to comment.