egg

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//NotDelete egg not deleted
	NotDelete uint8
	//Delete egg deleted
	Delete uint8 = 1
	//Publish egg publish
	Publish uint8 = 1
	//NotPublish egg not publish
	NotPublish uint8
	//Business log businessID
	Business = 201
)

Functions

This section is empty.

Types

type Egg

type Egg struct {
	ID        uint
	Stime     time.Time
	Etime     time.Time
	ShowCount int
	UID       int64 `gorm:"column:uid"`
	Publish   uint8
	Person    string
	Delete    uint8
}

Egg egg

func (Egg) TableName

func (a Egg) TableName() string

TableName Egg

type Index

type Index struct {
	ID        uint      `json:"id"`
	Words     string    `json:"words"`
	Stime     time.Time `json:"stime"`
	Etime     time.Time `json:"etime"`
	Plat      []Plat    `json:"plat"`
	ShowCount int       `json:"show_count"`
	Publish   uint8     `json:"publish"`
	Person    string    `json:"person"`
}

Index egg index

func (Index) TableName

func (a Index) TableName() string

TableName Egg

type IndexPager

type IndexPager struct {
	Item []*Index    `json:"item"`
	Page common.Page `json:"page"`
}

IndexPager return values

type IndexParam

type IndexParam struct {
	ID     string `json:"id" form:"id"`              // ID
	Stime  string `json:"stime" form:"stime"`        // 开始时间
	Etime  string `json:"etime" form:"etime"`        // 结束时间
	Person string `json:"person" form:"person"`      // 创建人
	Word   string `json:"word" form:"word"`          // 关键词
	Ps     int    `json:"ps" form:"ps" default:"20"` // 分页大小
	Pn     int    `json:"pn" form:"pn" default:"1"`  // 第几个分页
}

IndexParam Index egg index param

type Obj

type Obj struct {
	Query     []string  `json:"query" form:"query,split" validate:"required"`
	Stime     time.Time `json:"stime" form:"stime"`
	Etime     time.Time `json:"etime" form:"etime"`
	ShowCount int       `json:"show_count" form:"show_count" validate:"required"`
	Plat      string    `json:"plat" form:"plat" validate:"required"`
}

Obj add egg object

type ObjUpdate

type ObjUpdate struct {
	ID        uint      `form:"id" validate:"required"`
	Query     []string  `json:"query" form:"query,split" validate:"required"`
	Stime     time.Time `json:"stime" form:"stime"`
	Etime     time.Time `json:"etime" form:"etime"`
	ShowCount int       `json:"show_count" form:"show_count" validate:"required"`
	Plat      string    `json:"plat" form:"plat" validate:"required"`
}

ObjUpdate add egg object

type Plat

type Plat struct {
	EggID      uint   `json:"egg_id"`
	Plat       uint8  `json:"plat"`
	Conditions string `json:"conditions"`
	Build      string `json:"build"`
	URL        string `json:"url"`
	Md5        string `json:"md5"`
	Size       uint   `json:"size"`
	Deleted    uint8  `json:"deleted"`
}

Plat egg plat

func (Plat) TableName

func (a Plat) TableName() string

TableName Egg plat

type Query

type Query struct {
	EggID   uint
	Word    string
	STime   time.Time
	ETime   time.Time
	Deleted uint8
}

Query egg query

func (Query) TableName

func (a Query) TableName() string

TableName Egg query

type SearchEgg

type SearchEgg struct {
	ID    uint           `json:"id"`
	Words []string       `json:"query_list"`
	Stime time.Time      `json:"stime"`
	Etime time.Time      `json:"etime"`
	Plat  map[uint8]Plat `json:"plat"`
	//Plat      []Plat         `json:"plat"`
	ShowCount int   `json:"show_count"`
	Publish   uint8 `json:"publish"`
}

SearchEgg for searching

func (SearchEgg) TableName

func (a SearchEgg) TableName() string

TableName Egg

type SearchEggWeb

type SearchEggWeb struct {
	ID    uint             `json:"id"`
	Words []string         `json:"query_list"`
	Stime time.Time        `json:"stime"`
	Etime time.Time        `json:"etime"`
	Plat  map[uint8][]Plat `json:"plat"`
	//Plat      []Plat         `json:"plat"`
	ShowCount int   `json:"show_count"`
	Publish   uint8 `json:"publish"`
}

SearchEggWeb for searching

func (SearchEggWeb) TableName

func (a SearchEggWeb) TableName() string

TableName Egg

Jump to

Keyboard shortcuts

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