This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
app.models
Seamus Smith edited this page Apr 29, 2022
·
13 revisions
All the models for our app. Diagram
- PUBLIC: 'A'
- UNLISTED: 'U'
- PRIVATE: 'P'
- id: models.AutoField(primary_key=True)
- owner: models.ForeignKey(to=User, on_delete=models.CASCADE)
- visibility: models.CharField(max_length=1, choices=Visibility.choices, default=Visibility.PUBLIC)
- name: models.CharField(max_length=64)
- is_locked: models.BooleanField()
- auto_lock_after: models.DateTimeField()
- calendar_id = models.CharField(max_length=1024)
- calendar_meet_data = models.JSONField()
Returns a link to the schedule in Google Calendar
- id: models.AutoField(primary_key=True)
- schedule: models.ForeignKey(to=Schedule, on_delete=models.CASCADE)
- time_from: models.DateTimeField()
- time_to: models.DateTimeField()
- auto_lock_after: models.DateTimeField()
- is_locked: models.BooleanField()
- reservation_limit: models.IntegerField()
- id: models.AutoField(primary_key=True)
- name: models.CharField(max_length=747)
- time_slot: models.ForeignKey(to=TimeSlot, on_delete=models.CASCADE)
- email: models.EmailField()
- comment: models.CharField(max_length=256)
- id: models.AutoField(primary_key=True)
- schedule: models.ForeignKey(to=Schedule, on_delete=models.CASCADE)
- user: models.ForeignKey(to=User, on_delete=models.CASCADE)
- add_as_guest: models.BooleanField(default=False)
Hooks onto Schedule's pre_save signal. Adds relevant Google Calendar data to the model instance before comiting it to the database.
Hooks onto Schedule's post_delete signal. Deletes the Google Calendar for the schedule.
Hooks onto the Reservation's post_save signal to update the Calendar event associated with the reservation's timeslot.
Hooks onto the Reservation's post_delete signal to update the Calendar event associated with the reservation's timeslot.
Hooks onto each timeslot's delete signal after they are deleted. Deletes all events related to the timeslot.
- Things we use
- Heroku Maintaining
- Creating a dev environment
- Documentation Guidelines
- Calendar Integration Schema