models

package
v0.0.0-...-d3d774b Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GiveAway

type GiveAway struct {
	gorm.Model
	Name        string `gorm:"not null;unique"`
	Description string
	Status      bool
	Users       []TwitchUser `gorm:"many2many:user_giveaways;"`
}

GiveAway structure made exportable to be used with Gorm ORM

type Poll

type Poll struct {
	gorm.Model
	Name        string `gorm:"not null;unique"`
	Description string
	Status      bool
}

Poll structure made exportable to be used with Gorm ORM

type PollOption

type PollOption struct {
	gorm.Model
	Poll        Poll `gorm:"foreignKey:ID"`
	Name        string
	Description string
	Users       []TwitchUser `gorm:"many2many:user_votes;"`
}

PollOption struct allow to gives Roles to user

type Stat

type Stat struct {
	gorm.Model
	TwitchUserID uint
	Score        int `gorm:"not null;"`
}

Stat structure made exportable to be used with Gorm ORM

type TwitchUser

type TwitchUser struct {
	gorm.Model
	TwitchID    string `gorm:"uniqueIndex;"`
	Name        string
	DisplayName string
	Statistique Stat
	Votes       []PollOption `gorm:"many2many:user_votes;"`
	GiveAways   []GiveAway   `gorm:"many2many:user_giveaways;"`
}

TwitchUser will holds Twitch Users reccords

Jump to

Keyboard shortcuts

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