model

package
v0.0.0-...-f2c6537 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: Apache-2.0 Imports: 2 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	Me
	jwt.StandardClaims
}

type Event

type Event struct {
	ID              string     `json:"id" gorm:"type:uuid"`
	Name            string     `json:"name" gorm:"not null"`
	Description     string     `json:"description" gorm:"not null"`
	RegistrationUrl string     `json:"registrationUrl" gorm:"not null"`
	StartDate       *time.Time `json:"startDate" gorm:"not null"`
	EndDate         *time.Time `json:"endDate" gorm:"not null"`
	Photo           string     `json:"photo" gorm:"not null"`
	OrganizerName   string     `json:"organizerName" gorm:"not null"`
	Address         *string    `json:"address"`
	Sessions        []Session  `json:"sessions"`
	Speakers        []Speaker  `json:"speakers,omitempty" gorm:"-"`
}

type EventInput

type EventInput struct {
	Name            string     `json:"name,omitempty"`
	StartDate       *time.Time `json:"startDate,omitempty"`
	EndDate         *time.Time `json:"endDate,omitempty"`
	RegistrationUrl string     `json:"registrationUrl,omitempty"`
	Description     string     `json:"description,omitempty"`
	Photo           string     `json:"photo,omitempty"`
	OrganizerName   string     `json:"organizerName,omitempty"`
	Address         *string    `json:"address,omitempty"`
}

type Me

type Me struct {
	ID    string `json:"id,omitempty"`
	Email string `json:"email,omitempty"`
}

type Session

type Session struct {
	ID          string     `json:"id" gorm:"primaryKey;type:uuid"`
	Name        string     `json:"name" gorm:"not null"`
	StartDate   *time.Time `json:"startDate" gorm:"not null"`
	EndDate     *time.Time `json:"endDate" gorm:"not null"`
	Description string     `json:"description" gorm:"not null"`
	VideoUrl    string     `json:"videoUrl" gorm:"not null"`
	Event       Event      `json:"event,omitempty" gorm:"constraint:OnDelete:CASCADE"`
	EventID     string     `json:"eventId,omitempty" gorm:"type:uuid;not null"`
	Speakers    []Speaker  `json:"speakers,omitempty" gorm:"many2many:session_speakers;constraint:OnDelete:CASCADE;"`
}

type SessionInput

type SessionInput struct {
	Name        string     `json:"name,omitempty"`
	StartDate   *time.Time `json:"startDate,omitempty"`
	EndDate     *time.Time `json:"endDate,omitempty"`
	Description string     `json:"description,omitempty"`
	VideoUrl    string     `json:"videoUrl,omitempty"`
	SpeakerIds  []string   `json:"speakerIds,omitempty"`
	EventId     string     `json:"eventId,omitempty"`
}

type SignInInput

type SignInInput struct {
	Email    string `json:"email,omitempty"`
	Password string `json:"password,omitempty"`
}

type Speaker

type Speaker struct {
	ID       string    `json:"id" gorm:"type:uuid"`
	Name     string    `json:"name" gorm:"not null"`
	Bio      string    `json:"bio" gorm:"not null"`
	Headline string    `json:"headline" gorm:"not null"`
	Photo    string    `json:"photo" gorm:"not null"`
	Sessions []Session `json:"sessions,omitempty" gorm:"many2many:session_speakers;constraint:OnDelete:CASCADE;"`
}

type SpeakerInput

type SpeakerInput struct {
	Name     string `json:"name,omitempty"`
	Bio      string `json:"bio,omitempty"`
	Headline string `json:"headline,omitempty"`
	Photo    string `json:"photo,omitempty"`
}

type Upload

type Upload struct {
	Url string `json:"url,omitempty"`
}

type User

type User struct {
	ID    string `json:"id,omitempty"`
	Email string `json:"email,omitempty"`
	// We likely don't ever wanna expose the password hash.
	PasswordHash string `json:"-"`
}

Jump to

Keyboard shortcuts

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