Skip to content

Commit

Permalink
Database models
Browse files Browse the repository at this point in the history
  • Loading branch information
tsawler committed Apr 5, 2021
1 parent 7c71f5b commit 61ab306
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions internal/models/models.go
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
}

0 comments on commit 61ab306

Please sign in to comment.