Skip to content

Commit

Permalink
add roles
Browse files Browse the repository at this point in the history
  • Loading branch information
mat-ng committed Apr 1, 2024
1 parent f9b2b52 commit d87c173
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ const SEEDED_DATA = [
email: "[email protected]",
auth_id: "bide",
permission: "Reviewers",
role: "Developer",
role: "Project Developer",
},
{
first_name: "Jane",
last_name: "Doe",
email: "[email protected]",
auth_id: "none",
permission: "Reviewers",
role: "Developer",
role: "Project Developer",
},
{
first_name: "UW",
last_name: "Blueprint",
email: "[email protected]",
auth_id: "1Z4wyuonu9MhAi4VoAEiTMVj1iT2",
permission: "Reviewers",
role: "Developer",
role: "Project Developer",
},
];
// [email protected]
Expand Down Expand Up @@ -64,7 +64,11 @@ export const up: Migration = async ({ context: sequelize }) => {
defaultValue: "Reviewers"
},
role: {
type: DataType.ENUM("Developer", "Designer"),
type: DataType.ENUM(
"Co-President", "Director Lead", "Internal Director", "External Director",
"VP Engineering", "VP Design", "VP Product", "VP Project Scoping", "VP Finance & Operations", "VP Talent",
"Graphic Designer", "Marketing & Outreach Director", "Product Manager", "Project Lead", "Project Developer", "Product Developer"
),
allowNull: false,
},
createdAt: DataType.DATE,
Expand Down
8 changes: 7 additions & 1 deletion backend/typescript/models/user.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ export default class User extends Model {
@Column({ type: DataType.ENUM("VP Talent", "Eteam", "Engineering", "Product", "Design", "Reviewers"), allowNull: false, defaultValue: 'Reviewers' })
permission!: Permission;

@Column({ type: DataType.ENUM("Developer, Designer"), allowNull: false })
@Column({
type: DataType.ENUM(
"Co-President", "Director Lead", "Internal Director", "External Director",
"VP Engineering", "VP Design", "VP Product", "VP Project Scoping", "VP Finance & Operations", "VP Talent",
"Graphic Designer", "Marketing & Outreach Director", "Product Manager", "Project Lead", "Project Developer", "Product Developer"
), allowNull: false
})
role!: Role;

@HasMany(() => ApplicationDashboardTable)
Expand Down
4 changes: 3 additions & 1 deletion backend/typescript/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
export type Permission = "VP Talent" | "Eteam" | "Engineering" | "Product" | "Design" | "Reviewers";

export type Role = "Developer" | "Designer";
export type Role = "Co-President" | "Director Lead" | "Internal Director" | "External Director" |
"VP Engineering" | "VP Design" | "VP Product" | "VP Project Scoping" | "VP Finance & Operations" | "VP Talent" |
"Graphic Designer" | "Marketing & Outreach Director" | "Product Manager" | "Project Lead" | "Project Developer" | "Product Developer";

export enum StatusType {
ACCEPTED = "accepted",
Expand Down

0 comments on commit d87c173

Please sign in to comment.