Aggiunte un paio di cose al modello del db

dev
Antonio De Lucreziis 4 years ago
parent 1682cdca81
commit 1430c57423

@ -67,6 +67,8 @@ type Booking = {
type Slot = { type Slot = {
id: SlotID id: SlotID
seatID: SeatID 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: { range: {
from: Datetime from: Datetime
to: Datetime to: Datetime
@ -80,7 +82,6 @@ type Slot = {
*/ */
type Seat = { type Seat = {
id: SeatID id: SeatID
roomID: RoomID
diagram: { diagram: {
x: Natural x: Natural
y: 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>" // 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[] getCurrentlyBookedUsers(): User[]
getRoom(): Room
} }
/** /**
@ -97,12 +99,13 @@ type Seat = {
*/ */
type Room = { type Room = {
id: RoomID id: RoomID
seatIDs: SeatID[] name: string
diagram: { diagram: {
gridRows: Natural gridRows: Natural
gridCols: Natural gridCols: Natural
} }
getSeats(): Seat[]
getTotalSeatCount(): Natural // ".seatIDs.length" getTotalSeatCount(): Natural // ".seatIDs.length"
getCurrentBookedSeatCount(): Natural getCurrentBookedSeatCount(): Natural
} }

Loading…
Cancel
Save