-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c352580
commit f0f3f60
Showing
4 changed files
with
83 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import JSONAPIModel from "../util/json-api/JSONAPIModel"; | ||
|
||
export interface ReservationAttributes { | ||
'is-partial-day': boolean; | ||
'updated-at': number; | ||
'is-assignable': boolean; | ||
'name': string; | ||
'assigned-to': string | null; | ||
'neighborhood-id': number; | ||
'created-at': number; | ||
'neighborhood': number | null; | ||
'parent-desk-id': string | null; | ||
'availability': string | null; | ||
'enabled': boolean; | ||
'x-pos': number | null; | ||
'y-pos': number | null; | ||
} | ||
|
||
export interface ReservationCreationAttributes { | ||
// Required fields | ||
userId: number; | ||
|
||
// Optional fields | ||
deskId?: number | null; | ||
locationId?: number | null; | ||
inviteId?: number | null; | ||
entryId?: number | null; | ||
startTime?: number | null; // Unix timestamp | ||
endTime?: number | null; // Unix timestamp | ||
|
||
meta?: { | ||
autoAssignDesk?: boolean; | ||
}; | ||
} | ||
|
||
export type ReservationRelationships = 'location' | 'desk' | 'company' | 'floor' | 'employee' | 'entry' | 'invite' | 'user'; | ||
|
||
export type ReservationModel = JSONAPIModel<ReservationAttributes, ReservationRelationships, 'reservations'> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters