Setting up models
This commit is contained in:
parent
c4b41d305d
commit
44385fbbce
@ -1,9 +1,60 @@
|
||||
package models
|
||||
|
||||
// Reservation holds Reservation data
|
||||
import "time"
|
||||
|
||||
// User is the user model
|
||||
type User struct {
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
FirstName string
|
||||
LastName string
|
||||
Email string
|
||||
Password string
|
||||
ID int
|
||||
AccessLevel int
|
||||
}
|
||||
|
||||
// Room is the room model
|
||||
type Room struct {
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
RoomName string
|
||||
ID int
|
||||
}
|
||||
|
||||
// Restriction is the restriction model
|
||||
type Restriction struct {
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
RestrictionName string
|
||||
ID int
|
||||
}
|
||||
|
||||
// Reservation is the reservation model
|
||||
type Reservation struct {
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
StartDate time.Time
|
||||
EndDate time.Time
|
||||
FirstName string
|
||||
LastName string
|
||||
Email string
|
||||
Phone string
|
||||
Room Room
|
||||
ID int
|
||||
RoomID int
|
||||
}
|
||||
|
||||
// RoomRestriction is the room restriction model
|
||||
type RoomRestriction struct {
|
||||
StartDate time.Time
|
||||
EndDate time.Time
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
Room Room
|
||||
Restriction Restriction
|
||||
ID int
|
||||
RoomID int
|
||||
ReservationId int
|
||||
RestrictionID int
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user