mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2024-11-16 22:09:27 +08:00
added a option on course
This commit is contained in:
parent
4a9c81fd34
commit
2d75066884
7 changed files with 15 additions and 14 deletions
Binary file not shown.
Binary file not shown.
|
@ -22,6 +22,7 @@ class CustomUser(AbstractUser):
|
|||
('BS Food Technology', 'BS Food Technology'),
|
||||
('BS Applied Physics', 'BS Applied Physics'),
|
||||
('BS Environmental Science', 'BS Environmental Science'),
|
||||
('Not Applicable', 'Not Applicable'),
|
||||
)
|
||||
|
||||
course = models.CharField(
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -54,7 +54,7 @@ class EquipmentInstance(models.Model):
|
|||
return super().save(*args, **kwargs)
|
||||
|
||||
|
||||
seed_database = False
|
||||
seed_database = True
|
||||
|
||||
|
||||
@receiver(post_migrate)
|
||||
|
|
|
@ -1211,8 +1211,8 @@ components:
|
|||
email:
|
||||
type: string
|
||||
format: email
|
||||
readOnly: true
|
||||
title: Email address
|
||||
maxLength: 254
|
||||
first_name:
|
||||
type: string
|
||||
maxLength: 100
|
||||
|
@ -1220,22 +1220,29 @@ components:
|
|||
nullable: true
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/CourseEnum'
|
||||
- $ref: '#/components/schemas/BlankEnum'
|
||||
- $ref: '#/components/schemas/NullEnum'
|
||||
section:
|
||||
type: string
|
||||
nullable: true
|
||||
maxLength: 60
|
||||
last_name:
|
||||
type: string
|
||||
maxLength: 100
|
||||
is_teacher:
|
||||
type: boolean
|
||||
readOnly: true
|
||||
is_technician:
|
||||
type: boolean
|
||||
readOnly: true
|
||||
required:
|
||||
- course
|
||||
- email
|
||||
- first_name
|
||||
- id
|
||||
- is_teacher
|
||||
- is_technician
|
||||
- last_name
|
||||
- section
|
||||
- username
|
||||
Equipment:
|
||||
type: object
|
||||
|
@ -1486,8 +1493,8 @@ components:
|
|||
email:
|
||||
type: string
|
||||
format: email
|
||||
readOnly: true
|
||||
title: Email address
|
||||
maxLength: 254
|
||||
first_name:
|
||||
type: string
|
||||
maxLength: 100
|
||||
|
@ -1495,18 +1502,20 @@ components:
|
|||
nullable: true
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/CourseEnum'
|
||||
- $ref: '#/components/schemas/BlankEnum'
|
||||
- $ref: '#/components/schemas/NullEnum'
|
||||
section:
|
||||
type: string
|
||||
nullable: true
|
||||
maxLength: 60
|
||||
last_name:
|
||||
type: string
|
||||
maxLength: 100
|
||||
is_teacher:
|
||||
type: boolean
|
||||
readOnly: true
|
||||
is_technician:
|
||||
type: boolean
|
||||
readOnly: true
|
||||
PatchedEquipment:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -1589,8 +1598,6 @@ components:
|
|||
type: string
|
||||
format: date-time
|
||||
readOnly: true
|
||||
section:
|
||||
type: string
|
||||
SendEmailReset:
|
||||
type: object
|
||||
properties:
|
||||
|
@ -1707,13 +1714,10 @@ components:
|
|||
type: string
|
||||
format: date-time
|
||||
readOnly: true
|
||||
section:
|
||||
type: string
|
||||
required:
|
||||
- borrower
|
||||
- equipments
|
||||
- id
|
||||
- section
|
||||
- subject
|
||||
- teacher
|
||||
- timestamp
|
||||
|
@ -1743,10 +1747,6 @@ components:
|
|||
properties:
|
||||
username:
|
||||
type: string
|
||||
description: Required. 150 characters or fewer. Letters, digits and @/./+/-/_
|
||||
only.
|
||||
pattern: ^[\w.@+-]+$
|
||||
maxLength: 150
|
||||
email:
|
||||
type: string
|
||||
format: email
|
||||
|
|
Loading…
Reference in a new issue