Setting up models

This commit is contained in:
vinchent 2024-07-07 22:32:32 +02:00
parent c4b41d305d
commit 44385fbbce

View File

@ -1,9 +1,60 @@
package models 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 { type Reservation struct {
CreatedAt time.Time
UpdatedAt time.Time
StartDate time.Time
EndDate time.Time
FirstName string FirstName string
LastName string LastName string
Email string Email string
Phone 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
} }