-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[API] Add group creation and registration functionality (#1640)
* #1633 * Create model for groups (#1633) * Add group controller (#1634) * Add group service (#1634) * Add migration for user group field (#1635) * Add Controller for Group Registration (#1636) * Add Service for Group Registration (#1636) * Add MembershipExceedException (#1637) * Correct lint errors (#1632) * docs(core): update api docs with group routes --------- Co-authored-by: Jonas Kuche <jonas-ian.kuche@mni.thm.de>
- Loading branch information
Showing
9 changed files
with
904 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
modules/fbs-core/api/src/main/resources/migrations/20_group_field_added.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
BEGIN; | ||
|
||
|
||
CREATE TABLE IF NOT EXISTS `fbs`.`group` ( | ||
`group_id` INT NOT NULL AUTO_INCREMENT, | ||
`course_id` INT NOT NULL, | ||
`name` VARCHAR(100) NOT NULL, | ||
`membership` INT NOT NULL, | ||
`visible` TINYINT(1) NOT NULL DEFAULT 1, | ||
PRIMARY KEY (`group_id`), | ||
FOREIGN KEY (`course_id`) REFERENCES `fbs`.`course`(`course_id`), | ||
UNIQUE INDEX `groups_groupid_courseid_uindex` (`group_id`, `course_id`)) | ||
ENGINE = InnoDB | ||
DEFAULT CHARACTER SET = utf8mb4 | ||
COLLATE = utf8mb4_0900_ai_ci; | ||
|
||
INSERT INTO migration (number) VALUES (20); | ||
|
||
COMMIT; | ||
|
||
|
Oops, something went wrong.