Skip to content

Commit

Permalink
format files
Browse files Browse the repository at this point in the history
  • Loading branch information
creme332 committed May 18, 2024
1 parent c4514c9 commit b14f26f
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 18 deletions.
4 changes: 3 additions & 1 deletion resources/schema/Administrator.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"type": "boolean"
}
},
"required": ["job_title"]
"required": [
"job_title"
]
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion resources/schema/Client.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
"minimum": 1
}
},
"required": ["street", "city", "district_id"]
"required": [
"street",
"city",
"district_id"
]
}
]
}
Expand Down
34 changes: 27 additions & 7 deletions resources/schema/Comment.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,32 @@
"title": "Comment",
"type": "object",
"properties": {
"comment_id": { "type": "integer" },
"text": { "type": "string", "minLength": 1, "maxLength": 2000 },
"created_date": { "type": "string", "format": "date-time" },
"parent_comment_id": { "type": "integer" },
"user_id": { "type": "integer" },
"review_id": { "type": "integer" }
"comment_id": {
"type": "integer"
},
"text": {
"type": "string",
"minLength": 1,
"maxLength": 2000
},
"created_date": {
"type": "string",
"format": "date-time"
},
"parent_comment_id": {
"type": "integer"
},
"user_id": {
"type": "integer"
},
"review_id": {
"type": "integer"
}
},
"required": ["comment_id", "text", "created_date", "user_id"]
"required": [
"comment_id",
"text",
"created_date",
"user_id"
]
}
11 changes: 10 additions & 1 deletion resources/schema/Product.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,16 @@
"description": "The date and time when the product was created"
}
},
"required": ["name", "calories", "img_url", "img_alt_text", "category", "price", "description", "created_date"],
"required": [
"name",
"calories",
"img_url",
"img_alt_text",
"category",
"price",
"description",
"created_date"
],
"additionalProperties": false,
"patternProperties": {
"img_url": {
Expand Down
38 changes: 31 additions & 7 deletions resources/schema/Review.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,36 @@
"title": "Review",
"type": "object",
"properties": {
"review_id": { "type": "integer" },
"rating": { "type": "integer", "minimum": 1, "maximum": 5 },
"created_date": { "type": "string", "format": "date-time" },
"text": { "type": "string", "minLength": 2, "maxLength": 2000 },
"client_id": { "type": "integer" },
"product_id": { "type": "integer" }
"review_id": {
"type": "integer"
},
"rating": {
"type": "integer",
"minimum": 1,
"maximum": 5
},
"created_date": {
"type": "string",
"format": "date-time"
},
"text": {
"type": "string",
"minLength": 2,
"maxLength": 2000
},
"client_id": {
"type": "integer"
},
"product_id": {
"type": "integer"
}
},
"required": ["review_id", "rating", "created_date", "text", "client_id", "product_id"]
"required": [
"review_id",
"rating",
"created_date",
"text",
"client_id",
"product_id"
]
}
8 changes: 7 additions & 1 deletion resources/schema/User.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@
"minLength": 3
}
},
"required": ["user_id", "email", "first_name", "password", "phone_no"]
"required": [
"user_id",
"email",
"first_name",
"password",
"phone_no"
]
}
}
}

0 comments on commit b14f26f

Please sign in to comment.