Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookingModel ¶
type BookingModel struct {
C *mongo.Collection
}
BookingModel represent a mgo database session with a booking data model
func (*BookingModel) All ¶
func (m *BookingModel) All() ([]models.Booking, error)
All method will be used to get all records from bookings table
func (*BookingModel) Delete ¶
func (m *BookingModel) Delete(id string) (*mongo.DeleteResult, error)
Delete will be used to delete a booking registry
func (*BookingModel) FindByID ¶
func (m *BookingModel) FindByID(id string) (*models.Booking, error)
FindByID will be used to find a booking registry by id
func (*BookingModel) Insert ¶
func (m *BookingModel) Insert(booking models.Booking) (*mongo.InsertOneResult, error)
Insert will be used to insert a new booking registry
Click to show internal directories.
Click to hide internal directories.