entity

package
v0.0.0-...-af16168 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

*

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Id        int64  `json:"id"`
	Role      int64  `json:"role"`
	Email     string `json:"email"`
	Phone     string `json:"phone"`
	Nick      string `json:"nick"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Sex       bool   `json:"sex"`
	Skype     string `json:"skype"`
	Steam     string `json:"steam"`
	Trade     string `json:"trade"`
	Game      int64  `json:"game"`
	State     int64  `json:"state"`
	Img       string `json:"img"`

	Ban       bool   `json:"ban"`
	BanReason string `json:"ban_reason"`

	Created time.Time `json:"created"`
	Updated time.Time `json:"updated"`

	LastLogged time.Time `json:"last_logged"`

	Team []int64 `json:"team"`

	Balance  float64 `json:"-"`
	LastIp   string  `json:"-"`
	Provider string  `json:"-"`
	Token    string  `json:"-"`
	Password string  `json:"-"`
	Newpass  string  `json:"-"`
}

func (*Account) Appending

func (s *Account) Appending(rows *sql.Rows, size int64) *[]Scanable

func (*Account) GetId

func (s *Account) GetId() int64

func (*Account) Item

func (s *Account) Item(row *sql.Row) Scanable

func (*Account) Scanning

func (s *Account) Scanning(row *sql.Row, rows *sql.Rows) byte

func (*Account) SetId

func (s *Account) SetId(id int64)

type Category

type Category struct {
	Id          int64    `json:"id"`
	Parent      int64    `json:"parent"`
	Level       int      `json:"level"`
	Sort        int64    `json:"sort"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Lang        string   `json:"lang"`
	Enable      bool     `json:"enable"`
	Img         []string `json:"img"`
	Parameter   []int64  `json:"parameter"`
	Quantity    int64    `json:"quantity"`

	Children    []*Category `json:"-"`
	Ancestors   []*Category `json:"-"`
	Descendants []*Category `json:"-"`

	ParametersListView       template.HTML `json:"-"`
	DescendantsString        string        `json:"descendants_string"`
	PublicBreadcrumbPathView string        `json:"-"`
}

func (*Category) Appending

func (s *Category) Appending(rows *sql.Rows, size int64) *[]Scanable

func (*Category) GetDescription

func (this *Category) GetDescription() string

func (*Category) GetEnable

func (this *Category) GetEnable() bool

func (*Category) GetId

func (this *Category) GetId() int64

func (*Category) GetImg

func (this *Category) GetImg() []string

func (*Category) GetLang

func (this *Category) GetLang() string

func (*Category) GetLevel

func (this *Category) GetLevel() int
func (this *Category) GetLogo() string

func (*Category) GetParent

func (this *Category) GetParent() int64

func (*Category) GetQuantity

func (this *Category) GetQuantity() int64

func (*Category) GetSort

func (this *Category) GetSort() int64

func (*Category) GetTitle

func (this *Category) GetTitle() string

func (*Category) Item

func (s *Category) Item(row *sql.Row) Scanable

func (*Category) Scanning

func (s *Category) Scanning(row *sql.Row, rows *sql.Rows) byte

func (*Category) SetAncestors

func (this *Category) SetAncestors(item Hierarchical)

func (*Category) SetAncestorsDescendants

func (s *Category) SetAncestorsDescendants(parent int64, getDescendants bool) int

func (*Category) SetChildren

func (this *Category) SetChildren(item Hierarchical)

func (*Category) SetDescendants

func (this *Category) SetDescendants(item Hierarchical)

func (*Category) SetId

func (this *Category) SetId(id int64)

func (*Category) SetImg

func (this *Category) SetImg(img []string)

func (*Category) SetLevel

func (this *Category) SetLevel(level int)

func (*Category) SetPublicBreadcrumbPathView

func (s *Category) SetPublicBreadcrumbPathView()

func (*Category) SetPublicParametersListView

func (s *Category) SetPublicParametersListView(treeListParam *[]Parameter)

type Hierarchical

type Hierarchical interface {
	Scanable
	GetParent() int64
	SetLevel(level int)
	SetChildren(item Hierarchical)
	SetDescendants(item Hierarchical)
	SetAncestors(item Hierarchical)
}

type Parameter

type Parameter struct {
	Id          int64     `json:"id"`
	Parent      int64     `json:"parent"`
	Title       string    `json:"title"`
	Description string    `json:"description"`
	Sort        int64     `json:"sort"`
	Value       string    `json:"value"`
	Created     time.Time `json:"created"`
	Updated     time.Time `json:"updated"`
	Enable      bool      `json:"enable"`

	Level int `json:"level"`

	Children    []*Parameter `json:"-"`
	Ancestors   []*Parameter `json:"-"`
	Descendants []*Parameter `json:"-"`
}

func (*Parameter) Appending

func (s *Parameter) Appending(rows *sql.Rows, size int64) *[]Scanable

func (*Parameter) GetCreated

func (s *Parameter) GetCreated() time.Time

func (*Parameter) GetDescription

func (s *Parameter) GetDescription() string

func (*Parameter) GetEnable

func (s *Parameter) GetEnable() bool

func (*Parameter) GetId

func (s *Parameter) GetId() int64

func (*Parameter) GetLevel

func (s *Parameter) GetLevel() int

func (*Parameter) GetParent

func (s *Parameter) GetParent() int64

func (*Parameter) GetSort

func (s *Parameter) GetSort() int64

func (*Parameter) GetTitle

func (s *Parameter) GetTitle() string

func (*Parameter) GetUpdated

func (s *Parameter) GetUpdated() time.Time

func (*Parameter) GetValue

func (s *Parameter) GetValue() string

func (*Parameter) Item

func (s *Parameter) Item(row *sql.Row) Scanable

func (*Parameter) Scanning

func (s *Parameter) Scanning(row *sql.Row, rows *sql.Rows) byte

func (*Parameter) SetAncestors

func (this *Parameter) SetAncestors(item Hierarchical)

func (*Parameter) SetAncestorsDescendants

func (s *Parameter) SetAncestorsDescendants(parent int64, getDescendants bool) int

func (*Parameter) SetChildren

func (this *Parameter) SetChildren(item Hierarchical)

func (*Parameter) SetDescendants

func (this *Parameter) SetDescendants(item Hierarchical)

func (*Parameter) SetId

func (s *Parameter) SetId(id int64)

func (*Parameter) SetLevel

func (s *Parameter) SetLevel(level int)

type Permission

type Permission struct {
	Id          int64     `json:"id"`
	Code        string    `json:"code"`
	Category    int64     `json:"category"`
	Parameter   []int64   `json:"parameter"`
	Img         []string  `json:"img"`
	Title       string    `json:"title"`
	Description string    `json:"description"`
	Price       float64   `json:"price"`
	Price1      float64   `json:"price1"`
	Price2      float64   `json:"price2"`
	Quantity    float64   `json:"quantity"`
	Sold        int64     `json:"sold"`
	Views       int64     `json:"views"`
	Created     time.Time `json:"created"`
	Updated     time.Time `json:"updated"`
	Enable      bool      `json:"enable"`
}

func (*Permission) Appending

func (s *Permission) Appending(rows *sql.Rows, size int64) *[]Scanable

func (*Permission) GetCategory

func (s *Permission) GetCategory() int64

func (*Permission) GetCode

func (s *Permission) GetCode() string

func (*Permission) GetCreated

func (s *Permission) GetCreated() time.Time

func (*Permission) GetDescription

func (s *Permission) GetDescription() string

func (*Permission) GetEnable

func (s *Permission) GetEnable() bool

func (*Permission) GetId

func (s *Permission) GetId() int64

func (*Permission) GetImg

func (s *Permission) GetImg() []string

func (*Permission) GetParameter

func (s *Permission) GetParameter() []int64

func (*Permission) GetPrice

func (s *Permission) GetPrice() float64

func (*Permission) GetPrice1

func (s *Permission) GetPrice1() float64

func (*Permission) GetQuantity

func (s *Permission) GetQuantity() float64

func (*Permission) GetSold

func (s *Permission) GetSold() int64

func (*Permission) GetTitle

func (s *Permission) GetTitle() string

func (*Permission) GetUpdated

func (s *Permission) GetUpdated() time.Time

func (*Permission) GetViews

func (s *Permission) GetViews() int64

func (*Permission) Item

func (s *Permission) Item(row *sql.Row) Scanable

func (*Permission) Scanning

func (s *Permission) Scanning(row *sql.Row, rows *sql.Rows) byte

func (*Permission) SetId

func (s *Permission) SetId(id int64)

type Product

type Product struct {
	Id          int64     `json:"id"`
	Code        string    `json:"code"`
	Category    int64     `json:"category"`
	Parameter   []int64   `json:"parameter"`
	Img         []string  `json:"img"`
	Title       string    `json:"title"`
	Description string    `json:"description"`
	Price       float64   `json:"price"`
	Price1      float64   `json:"price1"`
	Price2      float64   `json:"price2"`
	Quantity    float64   `json:"quantity"`
	Sold        int64     `json:"sold"`
	Views       int64     `json:"views"`
	Created     time.Time `json:"created"`
	Updated     time.Time `json:"updated"`
	Enable      bool      `json:"enable"`
}

func (*Product) Appending

func (s *Product) Appending(rows *sql.Rows, size int64) *[]Scanable

func (*Product) GetCategory

func (s *Product) GetCategory() int64

func (*Product) GetCode

func (s *Product) GetCode() string

func (*Product) GetCreated

func (s *Product) GetCreated() time.Time

func (*Product) GetDescription

func (s *Product) GetDescription() string

func (*Product) GetEnable

func (s *Product) GetEnable() bool

func (*Product) GetId

func (s *Product) GetId() int64

func (*Product) GetImg

func (s *Product) GetImg() []string

func (*Product) GetParameter

func (s *Product) GetParameter() []int64

func (*Product) GetPrice

func (s *Product) GetPrice() float64

func (*Product) GetPrice1

func (s *Product) GetPrice1() float64

func (*Product) GetQuantity

func (s *Product) GetQuantity() float64

func (*Product) GetSold

func (s *Product) GetSold() int64

func (*Product) GetTitle

func (s *Product) GetTitle() string

func (*Product) GetUpdated

func (s *Product) GetUpdated() time.Time

func (*Product) GetViews

func (s *Product) GetViews() int64

func (*Product) Item

func (s *Product) Item(row *sql.Row) Scanable

func (*Product) Scanning

func (s *Product) Scanning(row *sql.Row, rows *sql.Rows) byte

func (*Product) SetId

func (s *Product) SetId(id int64)

type Scanable

type Scanable interface {
	GetId() int64
	SetId(id int64)
	Scanning(row *sql.Row, rows *sql.Rows) byte
	Appending(rows *sql.Rows, size int64) *[]Scanable
	Item(row *sql.Row) Scanable
}

type Session

type Session struct {
	Id         string
	Ip         string
	User_agent string
	Account    *Account
}

type State

type State struct {
	Id        int64    `json:"id"`
	Title     string   `json:"title"`
	Code      string   `json:"code"`
	Img       []string `json:"img"`
	Sort      int64    `json:"sort"`
	Flag      string   `json:"flag"`
	PhoneCode string   `json:"phone_code"`
	Enable    bool     `json:"enable"`
}

func (*State) Appending

func (s *State) Appending(rows *sql.Rows, size int64) *[]Scanable

func (*State) GetCode

func (s *State) GetCode() string

func (*State) GetId

func (s *State) GetId() int64

func (*State) GetImg

func (s *State) GetImg() []string

func (*State) GetPhone

func (s *State) GetPhone() string

func (*State) GetSort

func (s *State) GetSort() int64

func (*State) GetTitle

func (s *State) GetTitle() string

func (*State) Item

func (s *State) Item(row *sql.Row) Scanable

func (*State) Scanning

func (s *State) Scanning(row *sql.Row, rows *sql.Rows) byte

func (*State) SetFlag

func (s *State) SetFlag()

func (*State) SetId

func (s *State) SetId(id int64)

Jump to

Keyboard shortcuts

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