Skip to content
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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

RezaNajjarF
Copy link

No description provided.



class Provider(models.Model):
user_id = models.ForeignKey(User, on_delete=models.DO_NOTHING)
Copy link
Collaborator

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)
Copy link
Collaborator

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()
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants