model

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2022 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[]" faker:"boundary_start=1, boundary_end=10"`
	Teams       pq.Int64Array  `gorm:"type:integer[]" faker:"boundary_start=1, boundary_end=10"`
	Category    int            `faker:"boundary_start=1, boundary_end=15"`
	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         `gorm:"unique" faker:"sentence"`
	TeamID    int            `faker:"-" gorm:"unique" json:"team_id"`
	Abbrev    string         `gorm:"unique" json:"abbrev" faker:"username"`
}

type TeamReport

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

Jump to

Keyboard shortcuts

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