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