entities

package
v0.0.0-...-8ed6344 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: GPL-3.0 Imports: 0 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventsMock = Events{
	ID:         1,
	Name:       "Mock Event Name",
	StartTime:  "Mock Event StartTime",
	EndingTime: "Mock Event EndingTime",
	Disc:       "Mock Event Disc",
}
View Source
var PartiesMock = Parties{
	ID:     1,
	Name:   "Mock party name",
	Logo:   "Mock party logo",
	Slogan: "Mock party slogan",
	Event:  1,
}
View Source
var PostMock = Post{
	ID:     1,
	Name:   "Mock Post Name",
	Writer: "Mock post writer",
	Vid:    "Mock vid",
	Disc:   "Mock post description",
}
View Source
var RegPartiesMock = RegParties{
	ID:           1,
	PartiesRefer: 1,
	Parties:      Parties{},
	EventRefer:   1,
	Count:        1,
	Event:        Events{},
}
View Source
var RegVotersMock = RegVoters{
	ID:         1,
	VoterRefer: 1,
	Voters:     Voters{},

	Event:      Events{},
	EventRefer: 1,
	// contains filtered or unexported fields
}
View Source
var RoleMock = Role{
	ID:   1,
	Name: "",
}
View Source
var SessionMock = Session{
	ID:         1,
	UUID:       "",
	Expires:    1,
	SigningKey: []byte{},
}
View Source
var VotersMock = Voters{
	ID:       1,
	FullName: "",
	GID:      "",
	Password: "",
	Region:   "",
	Phone:    "",
	RoleID:   1,
}
View Source
var VotesMock = Votes{
	ID:           1,
	EventRefer:   1,
	PartiesRefer: 1,
	VoterRefer:   1,
}

Functions

This section is empty.

Types

type Events

type Events struct {
	ID         uint
	Name       string `gorm:"type:varchar(255); not null"`
	StartTime  string
	EndingTime string
	Disc       string `gorm:"type:varchar(200);not null"`
}

type Parties

type Parties struct {
	ID     int
	Name   string `gorm:"type:varchar(255);unique;not null"`
	Slogan string `gorm:"type:varchar(255); not null"`
	Event  int
}

type Post

type Post struct {
	ID     int
	Name   string `gorm:"type:varchar(200);not null"`
	Writer string `gorm:"type:varchar(200);not null"`
	Vid    string `gorm:"type:varchar(200);not null"`
	Disc   string `gorm:"type:varchar(200);not null"`
}

type RegParties

type RegParties struct {
	ID           int
	Parties      Parties `gorm:"foreignKey:PartiesRefer"`
	PartiesRefer int
	Event        Events `gorm:"foreignkey:EventRefer"`
	EventRefer   uint
	Count        int `gorm:"default:0"`
}

type RegVoters

type RegVoters struct {
	ID         int
	Voters     Voters `gorm:"foreignKey:VoterRefer"`
	VoterRefer int

	Event      Events `gorm:"foreignkey:EventRefer"`
	EventRefer int
	// contains filtered or unexported fields
}

type Role

type Role struct {
	ID    uint
	Name  string `gorm:"type:varchar(255)"`
	Voter []Voters
}

type Session

type Session struct {
	ID         uint
	UUID       string `gorm:"type:varchar(255);not null"`
	Expires    int64  `gorm:"type:varchar(255);not null"`
	SigningKey []byte `gorm:"type:varchar(255);not null"`
}

type User

type User struct {
	Username string `gorm:"type:varchar(255);unique;not null"`
	ID       int
	Region   string `gorm:"type:varchar(255)"`
	DID      string `gorm:"type:varchar(255)"`
	Age      int
	Password string
}

type Voters

type Voters struct {
	ID       int
	FullName string `gorm:"type:varchar(100);unique;not null"`
	GID      string `gorm:"type:varchar(255); not null"` //goverment id
	Password string `gorm:"type:varchar(255); not null"`
	Region   string `gorm:"type:varchar(100)"`
	Phone    string `gorm:"type:varchar(100);not null; unique"`
	RoleID   uint
}

type Votes

type Votes struct {
	ID           uint
	PartiesRefer int
	EventRefer   int
	VoterRefer   int
}

Jump to

Keyboard shortcuts

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