Aggiunte un paio di cose al modello del db
This commit is contained in:
+5
-2
@@ -67,6 +67,8 @@ type Booking = {
|
||||
type Slot = {
|
||||
id: SlotID
|
||||
seatID: SeatID
|
||||
// Magari invece di eliminare uno slot, in quanto ricrearlo potrebbe essere complicato e forse è meglio che i moderatori semplicemente disabilitino uno slot se vogliono non renderlo prenotabile (?)
|
||||
// disabled: boolean
|
||||
range: {
|
||||
from: Datetime
|
||||
to: Datetime
|
||||
@@ -80,7 +82,6 @@ type Slot = {
|
||||
*/
|
||||
type Seat = {
|
||||
id: SeatID
|
||||
roomID: RoomID
|
||||
diagram: {
|
||||
x: Natural
|
||||
y: Natural
|
||||
@@ -90,6 +91,7 @@ type Seat = {
|
||||
|
||||
// TODO: Forse per ora è meglio fare che più utenti possono prenotare lo stesso posto così inizialmente possiamo fare che in ogni stanza c'è solo un posto e la gente può prenotarsi solo "alla stanza" e non al posto specifico, altrimenti facciamo "getCurrentBookedUser(): Maybe<User>"
|
||||
getCurrentlyBookedUsers(): User[]
|
||||
getRoom(): Room
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -97,12 +99,13 @@ type Seat = {
|
||||
*/
|
||||
type Room = {
|
||||
id: RoomID
|
||||
seatIDs: SeatID[]
|
||||
name: string
|
||||
diagram: {
|
||||
gridRows: Natural
|
||||
gridCols: Natural
|
||||
}
|
||||
|
||||
getSeats(): Seat[]
|
||||
getTotalSeatCount(): Natural // ".seatIDs.length"
|
||||
getCurrentBookedSeatCount(): Natural
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user