-
Notifications
You must be signed in to change notification settings - Fork 34
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
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,9 +1,70 @@ | ||
package models | ||
|
||
import "time" | ||
|
||
// Reservation holds reservation data | ||
type Reservation struct { | ||
FirstName string | ||
LastName string | ||
Email string | ||
Phone string | ||
} | ||
|
||
// User is the user model | ||
type User struct { | ||
ID int | ||
FirstName string | ||
LastName string | ||
Email string | ||
Password string | ||
AccessLevel int | ||
CreatedAt time.Time | ||
UpdatedAt time.Time | ||
} | ||
|
||
// Room is the room model | ||
type Room struct { | ||
ID int | ||
RoomName string | ||
CreatedAt time.Time | ||
UpdatedAt time.Time | ||
} | ||
|
||
// Restrictions is the restriction model | ||
type Restrictions struct { | ||
ID int | ||
RestrictionName string | ||
CreatedAt time.Time | ||
UpdatedAt time.Time | ||
} | ||
|
||
// Reservations is the reservation model | ||
type Reservations struct { | ||
ID int | ||
FirstName string | ||
LastName string | ||
Email string | ||
Phone string | ||
StartDate time.Time | ||
EndDate time.Time | ||
RoomID int | ||
CreatedAt time.Time | ||
UpdatedAt time.Time | ||
Room Room | ||
Processed int | ||
} | ||
|
||
// RoomRestrictions is the room restriction model | ||
type RoomRestrictions struct { | ||
ID int | ||
StartDate time.Time | ||
EndDate time.Time | ||
RoomID int | ||
ReservationID int | ||
RestrictionID int | ||
CreatedAt time.Time | ||
UpdatedAt time.Time | ||
Room Room | ||
Reservation Reservations | ||
Restriction Restrictions | ||
} |