models

package
v0.0.0-...-5105de7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteVenue

func DeleteVenue(id int, db *gorm.DB) error

func GetVenues

func GetVenues(db *gorm.DB) (*[]Venue, error)

Types

type Venue

type Venue struct {
	gorm.Model
	Name        string `gorm:"size:100;not null;unique" json:"name"`
	Description string `gorm:"not null"                 json:"description"`
	Location    string `gorm:"size:100;not null"        json:"location"`
	Capacity    int    `gorm:"not null"                 json:"capacity"`
	Category    string `gorm:"size:100;not null"        json:"category"`
}

func GetVenueById

func GetVenueById(id int, db *gorm.DB) (*Venue, error)

func (*Venue) GetVenue

func (v *Venue) GetVenue(db *gorm.DB) (*Venue, error)

func (*Venue) Prepare

func (v *Venue) Prepare()

func (*Venue) Save

func (v *Venue) Save(db *gorm.DB) (*Venue, error)

func (*Venue) UpdateVenue

func (v *Venue) UpdateVenue(id int, db *gorm.DB) (*Venue, error)

func (*Venue) Validate

func (v *Venue) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL