model

package
v0.0.0-...-d98238c Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColumnSize       = "size"
	ColumnBio        = "bio"
	ColumnHelpNeeded = "help_needed"
)
View Source
const (
	ColumnDateTime    = "date_time"
	ColumnDescription = "description"
	ColumnLocation    = "location"
	ColumnDateFee     = "fee"
)
View Source
const (
	ColumnChatID    = "chat_id"
	ColumnLogID     = "log_id"
	ColumnClubID    = "club_id"
	ColumnEventID   = "event_id"
	ColumnTagID     = "tag_id"
	ColumnStudentID = "student_id"
)
View Source
const (
	ColumnUsername  = "username"
	ColumnEmail     = "email"
	ColumnPassword  = "password"
	ColumnID        = "id"
	ColumnCreatedAt = "created_at"
	ColumnDeletedAt = "deleted_at"
)
View Source
const (
	Failure = "Student Not Found"
	Success = "Student Found"
)
View Source
const AccessToken = "AccessToken"
View Source
const (
	ColumnIsHelping = "is_helping"
)
View Source
const (
	ColumnMessage = "message"
)
View Source
const RefreshToken = "RefreshToken"

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct {
	gorm.Model
	Logs []Log `gorm:"many2many:chat_log"`
}

func NewChat

func NewChat() *Chat

type Club

type Club struct {
	Person
	Tags       []Tag   `gorm:"many2many:club_tag;association_foreignkey:ID;foreignkey:ID"`
	Hosts      []Event `gorm:"many2many:club_event;association_foreignkey:ID;foreignkey:ID"`
	Chats      []Chat  `gorm:"many2many:club_chat;association_foreignkey:ID;foreignkey:ID"`
	Size       int
	Bio        string
	HelpNeeded bool
}

func NewClub

func NewClub() *Club

type Event

type Event struct {
	gorm.Model
	DateTime    time.Time
	Description string
	Location    string
	// contains filtered or unexported fields
}

func NewEvent

func NewEvent() *Event

type Log

type Log struct {
	gorm.Model
	Message string
}

func NewLog

func NewLog() *Log

type Person

type Person struct {
	gorm.Model
	Username string `gorm: "UNIQUE"`
	Email    string `gorm:"UNIQUE"`
	Password string
}

func NewPerson

func NewPerson() Person

type Status

type Status struct {
	Message string
	Data    interface{}
}

func NewStatus

func NewStatus() *Status

type Student

type Student struct {
	Person
	IsHelping bool
	Chats     []Chat  `gorm:"many2many:student_chat;association_foreignkey:ID;foreignkey:ID"`
	Tags      []Tag   `gorm:"many2many:student_tag;association_foreignkey:ID;foreignkey:ID"`
	Attends   []Event `gorm:"many2many:student_event;association_foreignkey:ID;foreignkey:ID"`
	Swipes    []Club  `gorm:"many2many:student_swipe;association_foreignkey:ID;foreignkey:ID"`
}

func NewStudent

func NewStudent() *Student

type T

type T struct{}

type Tag

type Tag struct {
	gorm.Model
	Name string
}

func NewTag

func NewTag() *Tag

type TokenInfo

type TokenInfo struct {
	AccessToken  string
	RefreshToken string
}

func NewTokenInfo

func NewTokenInfo() *TokenInfo

Jump to

Keyboard shortcuts

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