Documentation
¶
Index ¶
- func EmailValidate(email string) error
- func PasswordValidate(password string) error
- func UsernameValidate(username string) error
- type EmailVerification
- type Event
- func (e *Event) CreateEvent(db *gorm.DB, c *gin.Context, event *Event)
- func (e *Event) DeleteEvent(db *gorm.DB, c *gin.Context, event *Event)
- func (e *Event) DeletePermanently(db *gorm.DB, c *gin.Context, event *Event)
- func (e *Event) GetByID(db *gorm.DB, id uint) error
- func (e *Event) UndoDeleteEvent(db *gorm.DB, c *gin.Context, event *Event)
- func (e *Event) UpdateEvent(db *gorm.DB, c *gin.Context, event *Event)
- type Organizer
- type Ticket
- type TicketDetails
- type UserCart
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmailValidate ¶
func PasswordValidate ¶
func UsernameValidate ¶
Types ¶
type EmailVerification ¶
type EmailVerification struct {
gorm.Model
OrganizerID uint `gorm:"not null"`
Email string `gorm:"size:100;not null;unique" json:"email"`
Token string `gorm:"size:255;not null" json:"token"`
Sent bool `gorm:"default:false"`
Organizer Organizer `gorm:"foreignKey:OrganizerID"`
}
func (*EmailVerification) CreateEmailVerData ¶
func (e *EmailVerification) CreateEmailVerData(db *gorm.DB, c *gin.Context, body *EmailVerification) error
type Event ¶
type Event struct {
gorm.Model
OrganizerID uint `gorm:"not null"`
Organizer Organizer `gorm:"foreignKey:OrganizerID"`
Title string `gorm:"size:100;not null"`
Description string `gorm:"type:text;not null"`
ImageURL string `gorm:"size:255"`
Location string `gorm:"type:text"`
Venue string `gorm:"size:100"`
Date time.Time `gorm:"type:date;not null"`
Time string `gorm:"size:5;not null"`
Price float64 `gorm:"type:decimal(10,2);not null"`
TicketDetails []Ticket
}
func (*Event) DeletePermanently ¶
func (*Event) UndoDeleteEvent ¶
type Organizer ¶
type Organizer struct {
gorm.Model
Username string `gorm:"size:50;not null;unique" `
Email string `gorm:"size:100;not null;unique" `
PasswordHash string `gorm:"size:255;not null" json:"-"`
Password string `json:"password"`
IsVerfied bool `gorm:"default:false"`
}
type Ticket ¶
type Ticket struct {
gorm.Model
EventID uint `gorm:"not null"`
Event Event `gorm:"foreignKey:EventID"`
FirstName string `gorm:"size:50;not null" json:"first_name"`
LastName string `gorm:"size:50;not null" json:"last_name"`
Email string `gorm:"size:100;not null" json:"email"`
Reference string `gorm:"size:400;not null"`
EventPrice float64 `gorm:"type:decimal(10,2);not null"`
Paid bool `gorm:"default:false"`
Validated bool `gorm:"default:false"`
BoughtDate time.Time
}
type TicketDetails ¶
Click to show internal directories.
Click to hide internal directories.