-
Notifications
You must be signed in to change notification settings - Fork 16
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
apps created, models defined and registered on admin page #16
base: main
Are you sure you want to change the base?
Conversation
|
||
|
||
class Provider(models.Model): | ||
user_id = models.ForeignKey(User, on_delete=models.DO_NOTHING) |
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.
user id is a one to one relation
provider_id = models.ForeignKey(Provider, on_delete=models.DO_NOTHING) | ||
service_id = models.ForeignKey(Service, on_delete=models.DO_NOTHING, blank=True) | ||
appointment_date = models.DateField() | ||
status = models.CharField(max_length=100) |
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.
having choices is a better implementation
user_id = models.ForeignKey(User, on_delete=models.DO_NOTHING) | ||
provider_id = models.ForeignKey(Provider, on_delete=models.DO_NOTHING) | ||
service_id = models.ForeignKey(Service, on_delete=models.DO_NOTHING, blank=True) | ||
appointment_date = models.DateField() |
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.
appointment date should include both date and time
No description provided.