-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from lexica-app/GEM-27
[GEM-27] - User Onboarding
- Loading branch information
Showing
13 changed files
with
260 additions
and
134 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
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
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
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 |
---|---|---|
@@ -1,6 +1,14 @@ | ||
package auth | ||
|
||
import "github.com/oklog/ulid/v2" | ||
|
||
type superadminSignInReq struct { | ||
Email string `json:"email"` | ||
Password string `json:"password"` | ||
} | ||
|
||
type onboardReq struct { | ||
Role string `json:"role"` | ||
EducationLevel string `json:"education_level"` | ||
InterestIds []ulid.ULID `json:"interest_ids"` | ||
} |
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
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
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
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
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,5 @@ | ||
ALTER TABLE IF EXISTS users | ||
DROP COLUMN IF EXISTS role, | ||
DROP COLUMN IF EXISTS education_level; | ||
|
||
DROP TABLE IF EXISTS users_interests; |
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,13 @@ | ||
CREATE TABLE IF NOT EXISTS users_interests ( | ||
id BYTEA NOT NULL, | ||
user_id BYTEA NOT NULL, | ||
category_id BYTEA NOT NULL, | ||
created_at TIMESTAMPTZ DEFAULT NOW() NOT NULL, | ||
deleted_at TIMESTAMPTZ, | ||
PRIMARY KEY(id), | ||
CONSTRAINT users_interests_unique UNIQUE NULLS NOT DISTINCT (user_id, category_id, deleted_at) | ||
); | ||
|
||
ALTER TABLE IF EXISTS users | ||
ADD COLUMN IF NOT EXISTS role VARCHAR(50), | ||
ADD COLUMN IF NOT EXISTS education_level VARCHAR(50); |
Oops, something went wrong.