model

package
Version: v0.1.18 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID          uint           `gorm:"primaryKey" faker:"-"`
	CreatedAt   time.Time      `faker:"-"`
	UpdatedAt   time.Time      `faker:"-"`
	DeletedAt   gorm.DeletedAt `gorm:"index" faker:"-"`
	Name        string         `faker:"word"`
	Description string         `faker:"sentence"`
	Multiplier  int
}

type EcomEvent

type EcomEvent struct {
	ID        uint           `gorm:"primaryKey" faker:"-"`
	CreatedAt time.Time      `faker:"-"`
	UpdatedAt time.Time      `faker:"-"`
	DeletedAt gorm.DeletedAt `gorm:"index" faker:"-"`
	Team      string         // Team short-code/alias
	Success   bool
}

Register transactions from the ecom API

type Event

type Event struct {
	ID          uint           `gorm:"primaryKey" faker:"-"`
	CreatedAt   time.Time      `faker:"-"`
	UpdatedAt   time.Time      `faker:"-"`
	DeletedAt   gorm.DeletedAt `gorm:"index" faker:"-"`
	Targets     pq.Int64Array  `gorm:"type:integer[]"`
	Teams       pq.Int64Array  `gorm:"type:integer[]"`
	Category    int
	Description string `faker:"sentence"`
}

type Target

type Target struct {
	ID        uint           `gorm:"primaryKey" faker:"-"`
	CreatedAt time.Time      `faker:"-"`
	UpdatedAt time.Time      `faker:"-"`
	DeletedAt gorm.DeletedAt `gorm:"index" faker:"-"`
	Name      string         `faker:"username"`
	OS        string         `faker:"oneof: windows, linux, bsd"`
}

type Team

type Team struct {
	ID        uint           `gorm:"primaryKey" faker:"-"`
	CreatedAt time.Time      `faker:"-"`
	UpdatedAt time.Time      `faker:"-"`
	DeletedAt gorm.DeletedAt `gorm:"index" faker:"-"`
	Name      string         `faker:"username" gorm:"unique"`
	TeamID    int            `gorm:"unique" json:"team_id"`
	Abbrev    string         `gorm:"unique" json:"abbrev"`
}

type TeamReport

type TeamReport struct {
	Score    int
	Timeline []Event
	Targets  []Target
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL