entities

package
v0.0.0-...-21824ef Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSVParticipant

type CSVParticipant struct {
	Name        string `csv:"name" json:"name"`
	RegNo       string `csv:"reg_no" json:"reg_no"`
	Email       string `csv:"email" json:"email"`
	PhoneNumber string `csv:"phone_number" json:"phone_number"`
	Gender      string `csv:"gender" json:"gender"`
	IsPresent   bool   `csv:"is_present" json:"is_present"`
}

func P2CSVPTransform

func P2CSVPTransform(part *Participant) *CSVParticipant

type Coupon

type Coupon struct {
	CouponId     uint          `json:"coupon_id" gorm:"primary_key;AUTO_INCREMENT"`
	EventId      uint          `json:"event_id"`
	Day          uint          `json:"day"`
	Name         string        `json:"name"`
	Description  string        `json:"description"`
	DeletedAt    *time.Time    `json:"-" sql:"index"`
	Participants []Participant `json:"-" gorm:"many2many:coupon_participant"`
}

type Event

type Event struct {
	ID                    uint           `json:"event_id" gorm:"primary_key;AUTO_INCREMENT"`
	Days                  uint           `json:"days"`
	OrganizationID        uint           `json:"org_id"`
	Name                  string         `json:"name" gorm:"unique"`
	Budget                string         `json:"budget"`
	Description           string         `json:"description"`
	Category              string         `json:"category"`
	Venue                 string         `json:"venue"`
	Attendance            string         `json:"attendance"`
	ExpectedParticipants  string         `json:"expected_participants"`
	PROrequest            string         `json:"pro_request"`
	CampusEngineerRequest string         `json:"campus_engineer_request"`
	Duration              string         `json:"duration"`
	Status                string         `json:"status"`
	ToDate                time.Time      `json:"to_date"`
	FromDate              time.Time      `json:"from_date"`
	ToTime                time.Time      `json:"to_time"`
	FromTime              time.Time      `json:"from_time"`
	DeletedAt             *time.Time     `json:"-" sql:"index"`
	Attendees             []Participant  `json:"attendees" gorm:"many2many:participant_events;"`
	Guests                []Guest        `json:"guests" gorm:"many2many:guest_event;"`
	Segments              []EventSegment `json:"-"`
}

type EventSegment

type EventSegment struct {
	EventID             uint          `json:"event_id" gorm:"primary_key"`
	Day                 uint          `json:"day" gorm:"primary_key"`
	PresentParticipants []Participant `json:"-" gorm:"many2many:participant_event_segment"`
	DeletedAt           *time.Time    `json:"-" sql:"index"`
}

type Guest

type Guest struct {
	Name           string     `json:"name"`
	Email          string     `json:"email" gorm:"primary_key;"`
	PhoneNumber    string     `json:"phone_number"`
	Gender         string     `json:"gender"`
	Stake          string     `json:"stake"`
	LocationOfStay string     `json:"location_of_stay"`
	Events         []Event    `json:"-" gorm:"many2many:guest_event;"`
	DeletedAt      *time.Time `json:"-" sql:"index"`
}

type JoinRequest

type JoinRequest struct {
	OrganizationID uint   `gorm:"primary_key" json:"org_id"`
	Email          string `gorm:"primary_key" json:"email"`
}

type Organization

type Organization struct {
	ID           uint          `json:"org_id" gorm:"primary_key;AUTO_INCREMENT"`
	Name         string        `json:"name" gorm:"unique"`
	Location     string        `json:"location"`
	Description  string        `json:"description"`
	Tag          string        `json:"tag"`
	Website      string        `json:"website"`
	CreatedAt    time.Time     `json:"created_at"`
	DeletedAt    *time.Time    `sql:"index"`
	Events       []Event       `json:"-"`
	JoinRequests []JoinRequest `json:"-"`
	Users        []User        `json:"-" gorm:"many2many:user_orgs;"`
}

type Participant

type Participant struct {
	Name          string         `json:"name"`
	RegNo         string         `json:"reg_no"`
	Email         string         `json:"email" gorm:"primary_key"`
	PhoneNumber   string         `json:"phone_number"`
	Gender        string         `json:"gender"`
	DeletedAt     *time.Time     `json:"-" sql:"index"`
	Events        []Event        `json:"-" gorm:"many2many:participant_events;"`
	Coupons       []Coupon       `json:"-" gorm:"many2many:coupon_participant;"`
	EventSegments []EventSegment `json:"-" gorm:"many2many:participant_event_segment"`
}

type User

type User struct {
	FirstName     string         `json:"first_name"`
	LastName      string         `json:"last_name"`
	Password      string         `json:"password"`
	Email         string         `json:"email" gorm:"primary_key"`
	PhoneNumber   string         `json:"phone_number"`
	Linkedin      string         `json:"linkedin"`
	Facebook      string         `json:"facebook"`
	Description   string         `json:"description"`
	CreatedAt     time.Time      `json:"created_at"`
	DeviceToken   string         `json:"device_token"`
	Organizations []Organization `json:"-" gorm:"many2many:user_orgs;"`
}

Jump to

Keyboard shortcuts

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