panel

package
v0.0.0-...-eb64f0e Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Service *serviceProvider
)

Functions

This section is empty.

Types

type Detail

type Detail struct {
	ID        uint32    `gorm:"primary_key;AUTO_INCREMENT"`
	Belong    uint      `gorm:"unique_index;not null"`
	Picture   string    `gorm:"type:varchar(100)"`
	Content   string    `gorm:"type:LONGTEXT"`
	UpdatedAt time.Time `gorm:"column:updatedat" json:"updatedAt"`
	CreatedAt time.Time `gorm:"column:createdat" json:"createdAt"`
}

type Panel

type Panel struct {
	ID        uint32    `gorm:"primary_key;AUTO_INCREMENT" json:"id"`
	Title     string    `gorm:"type:varchar(50)" validate:"required" json:"title"`
	Desc      string    `gorm:"type:varchar(100)" json:"desc"`
	Type      uint8     `gorm:"type:TINYINT;not null" validate:"eq=1|eq=2|eq=3" json:"type"` // 1 promotion && flash sale;2 recommends && advertising;3 second-hand && other things
	Status    uint8     `gorm:"type:TINYINT;default:1" json:"status"`
	Sequence  uint8     `gorm:"unique_index;not null" json:"sequence"`
	UpdatedAt time.Time `gorm:"column:updatedat"`
	CreatedAt time.Time `gorm:"column:createdat"`
}

type PanelsPage

type PanelsPage struct {
	ID        uint          `json:"id"`
	Title     string        `json:"title"`
	Desc      string        `json:"desc"`
	Type      uint8         `json:"type"`
	Status    uint8         `json:"status"`
	Sequence  int           `json:"sequence"`
	CreatedAt time.Time     `json:"createdAt"`
	Content   []interface{} `json:"content"`
}

type PromotionReq

type PromotionReq struct {
	Belong  uint   `json:"belong" validate:"required"`
	Content string `json:"content" validate:"required"`
}

type RecommendReq

type RecommendReq struct {
	Belong  uint   `json:"belong" validate:"required"`
	Picture string `json:"picture" validate:"required"`
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

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