-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: create scheduling model + migration #7
Conversation
@Column({ type: DataType.BOOLEAN }) | ||
volunteer_needed!: boolean; | ||
|
||
@Column({ type: DataType.INTEGER }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the volunteer that is allocated for the specific schedule slot?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if there's multiple volunteers should this be an array instead?
volunteer_id!: number[] | null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need more than one volunteer for any slots? @Shehryar21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it wouldn't hurt to support it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could support that but I am just thinking that then we probably would want to ask how many volunteers needed as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we could change volunteers_needed to an int, and if volunteers aren't needed this would just be 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup that works. Default value would be 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated!
Co-authored-by: Hanlin Cheng <h62cheng@uwaterloo.ca>
Co-authored-by: Hanlin Cheng <h62cheng@uwaterloo.ca>
@Column({ type: DataType.BOOLEAN }) | ||
volunteer_needed!: boolean; | ||
|
||
@Column({ type: DataType.INTEGER }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup that works. Default value would be 0
Update: We actually do not need the migration files. Local db is updated when we do docker-compose up but for us that wasnt happening because node mailer was not configured and was causing the backend to crash. I will update the team in the next work session so please dont merge it. |
volunteers_needed!: number; | ||
|
||
@Column({ type: DataType.ARRAY(DataType.INTEGER) }) | ||
volunteer_ids!: number[] | null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once we have a volunteer table, volunteer_id would be a foreign key reference to the volunteer table. I am not sure if we can have a list of foreign key references. We might have to create another table schedule_volunteer_mapping
which maps volunteer id to scheduling id in the future. For now, we can probably keep it like this since we dont have a volunteer table, but if you can leave a comment about this, that would be nice.
id!: number; | ||
|
||
@Column({ type: DataType.INTEGER }) | ||
donor_id!: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also leave a comment for now that donor_id would be changed to have a foreign key reference to donors table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the comments!
Notion ticket link
Create Scheduling Table
Implementation description
Steps to test
What should reviewers focus on?
Checklist