academy

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: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//StateRemove 移除状态
	StateRemove = -1
	//StateNormal 正常状态
	StateNormal = 0
	//BusinessForArchvie 稿件
	BusinessForArchvie = 1
	//BusinessForArticle 专栏
	BusinessForArticle = 2
	//LogClientAcademy 日志服务类型
	LogClientAcademy = 181
	//DefaultState check search archive state
	DefaultState = 2018
)
View Source
const (

	//Course 教程级别
	Course
	//Operation 运营标签
	Operation
	//Classify 分类标签
	Classify
	//ArticleClass 专栏分类
	ArticleClass
	//H5 手机端分类标签
	H5
	//Recommend 理由标签
	Recommend
)
View Source
const (
	//StateUnBlock 解冻状态
	StateUnBlock = 0
	//StateBlock 冻结状态
	StateBlock = -1
)

Variables

This section is empty.

Functions

func TagClass

func TagClass() map[int]string

TagClass for tag type name map.

Types

type ArcSkill

type ArcSkill struct {
	ID    int64  `gorm:"column:id"   form:"id" json:"id"`
	AID   int64  `gorm:"column:aid"  form:"aid" json:"aid"`
	PID   int64  `gorm:"column:pid"  form:"pid" json:"pid"`
	SkID  int64  `gorm:"column:skid" form:"skid" json:"skid"`
	SID   int64  `gorm:"column:sid"  form:"sid" json:"sid"`
	Type  int    `gorm:"column:type" form:"type" json:"type"`
	State int    `gorm:"column:state" form:"state" json:"state"`
	CTime string `gorm:"column:ctime" form:"ctime" json:"-"`
	MTime string `gorm:"column:mtime" form:"mtime" json:"-"`
	Title string `gorm:"-" form:"title" json:"title"`
	Pic   string `gorm:"-" form:"pic" json:"pic"`
	Pn    int    `gorm:"-" form:"pn" json:"-"`
	Ps    int    `gorm:"-" form:"ps" json:"-"`
}

ArcSkill for academy archive relation to occupation & skill & software.

func (*ArcSkill) TableName

func (s *ArcSkill) TableName() string

TableName get table name

type ArcSkills

type ArcSkills struct {
	Pager *Pager      `json:"pager"`
	Items []*ArcSkill `json:"items"`
}

ArcSkills for archive skill list

type Archive

type Archive struct {
	ID       int64  `gorm:"column:id"`
	OID      int64  `gorm:"column:oid"`
	Title    string `gorm:"column:title"`
	State    int8   `gorm:"column:state"`
	Business int8   `gorm:"column:business"`
	CTime    string `gorm:"column:ctime"`
	MTime    string `gorm:"column:mtime"`
	Comment  string `gorm:"column:comment"`
	Hot      int64  `gorm:"column:hot"`
}

Archive for academy achive & article.

func (*Archive) TableName

func (a *Archive) TableName() string

TableName get table name

type ArchiveCount

type ArchiveCount struct {
	TID   int64 `gorm:"column:tid"`
	Count int   `gorm:"column:count"` //当前tag关联的稿件量
}

ArchiveCount get archive count by tid.

type ArchiveMeta

type ArchiveMeta struct {
	OID     int64              `json:"oid"`
	State   int32              `json:"state"`
	Forbid  int8               `json:"forbid"`
	Cover   string             `json:"cover"`
	Type    string             `json:"type"`
	Title   string             `json:"title"`
	UName   string             `json:"uname"`
	Comment string             `json:"comment"`
	CTime   int64              `json:"ctime"`
	MTime   int64              `json:"mtime"`
	Tags    map[int][]*TagMeta `json:"tags"`
	Hot     int64              `json:"hot"`
}

ArchiveMeta for archive meta.

type ArchiveOrigin

type ArchiveOrigin struct {
	OID      int64
	TIDs     []int64
	Comment  string
	Business int8
}

ArchiveOrigin for archive list.

type ArchiveTag

type ArchiveTag struct {
	ID       int64  `gorm:"column:id"`
	OID      int64  `gorm:"column:oid"`
	TID      int64  `gorm:"column:tid"`
	State    int8   `gorm:"column:state"`
	Business int8   `gorm:"column:business"`
	CTime    string `gorm:"column:ctime"`
	MTime    string `gorm:"column:mtime"`
}

ArchiveTag for academy achive & tag relation .

func (*ArchiveTag) TableName

func (at *ArchiveTag) TableName() string

TableName get table name

type ArchiveTags

type ArchiveTags struct {
	ID       int64 `gorm:"column:id"`
	TID      int64 `gorm:"column:tid"`
	OID      int64 `gorm:"column:oid"`
	Type     int8  `gorm:"column:type"`
	Business int8  `gorm:"column:business"`
}

ArchiveTags for archive tag relation.

type Archives

type Archives struct {
	Pager *Pager         `json:"pager"`
	Items []*ArchiveMeta `json:"items"`
}

Archives for archive list

type EsArc

type EsArc struct {
	OID int64   `json:"oid"`
	TID []int64 `json:"tid"`
}

EsArc for search archive.

type EsPage

type EsPage struct {
	Num   int `json:"num"`
	Size  int `json:"size"`
	Total int `json:"total"`
}

EsPage for es page.

type EsParam

type EsParam struct {
	OID       int64
	Business  int8
	Keyword   string
	Uname     string
	TID       []int64
	Copyright int
	State     int
	Pn        int
	Ps        int
	IP        string
	TidsMap   map[int][]int64
}

EsParam for es param.

type LogParam

type LogParam struct {
	UID    int64  `json:"uid"`
	UName  string `json:"uname"`
	Action string `json:"action"`
	TID    int64  `json:"tid"`
	OIDs   string `json:"oids"`
	OName  string `json:"oname"`
	OState int8   `json:"ostate"`
}

LogParam for manager.

type Occupation

type Occupation struct {
	ID           int64    `gorm:"column:id"    form:"id" json:"id"`
	Rank         int64    `gorm:"column:rank"  form:"rank" json:"rank"`
	State        int      `gorm:"column:state" form:"state" json:"state"`
	Name         string   `gorm:"column:name"  form:"name" json:"name"`
	Desc         string   `gorm:"column:desc"  form:"desc" json:"desc"`
	MainStep     string   `gorm:"column:main_step"     form:"main_step" json:"main_step"`
	MainSoftware string   `gorm:"column:main_software" form:"main_software" json:"main_software"`
	CTime        string   `gorm:"column:ctime" form:"ctime" json:"-"`
	MTime        string   `gorm:"column:mtime" form:"mtime" json:"-"`
	Skill        []*Skill `gorm:"-" form:"-" json:"skill"`
	Count        int      `gorm:"-" form:"-" json:"count"`
}

Occupation for academy occupation.

func (*Occupation) TableName

func (o *Occupation) TableName() string

TableName get table name

type Pager

type Pager struct {
	Num   int `json:"num"`
	Size  int `json:"size"`
	Total int `json:"total"`
}

Pager Pager def.

type SearchKeywords

type SearchKeywords struct {
	ID       int64             `gorm:"column:id"  form:"id" json:"id"`
	Rank     int64             `gorm:"column:rank" form:"rank" json:"rank"`
	ParentID int64             `gorm:"column:parent_id" form:"parent_id" json:"parent_id"`
	State    int8              `gorm:"column:state" form:"state" json:"state"`
	Name     string            `gorm:"column:name"  form:"name" json:"name"`
	Comment  string            `gorm:"column:comment" form:"comment" json:"comment"`
	CTime    string            `gorm:"column:ctime"   form:"ctime"  json:"-"`
	MTime    string            `gorm:"column:mtime"   form:"mtime" json:"-"`
	Count    int               `gorm:"-" form:"-" json:"count,omitempty"`
	Children []*SearchKeywords `json:"children,omitempty"`
}

SearchKeywords for academy h5 search keywords.

func (*SearchKeywords) TableName

func (sk *SearchKeywords) TableName() string

TableName get table name

type SearchResult

type SearchResult struct {
	Page   *EsPage  `json:"page"`
	Result []*EsArc `json:"result"`
}

SearchResult archive list from search.

type Skill

type Skill struct {
	ID       int64       `gorm:"column:id"    form:"id" json:"id"`
	OID      int64       `gorm:"column:oid"   form:"oid" json:"oid"`
	State    int         `gorm:"column:state" form:"state" json:"state"`
	Name     string      `gorm:"column:name"  form:"name" json:"name"`
	Desc     string      `gorm:"column:desc"  form:"desc" json:"desc"`
	CTime    string      `gorm:"column:ctime" form:"ctime" json:"-"`
	MTime    string      `gorm:"column:mtime" form:"mtime" json:"-"`
	Software []*Software `gorm:"-" form:"-" json:"software"`
	Count    int         `gorm:"-" form:"-" json:"count"`
}

Skill for academy skill.

func (*Skill) TableName

func (s *Skill) TableName() string

TableName get table name

type Software

type Software struct {
	ID    int64  `gorm:"column:id"    form:"id" json:"id"`
	SkID  int64  `gorm:"column:skid"  form:"skid" json:"skid"`
	State int    `gorm:"column:state" form:"state" json:"state"`
	Name  string `gorm:"column:name"  form:"name" json:"name"`
	Desc  string `gorm:"column:desc"  form:"desc" json:"desc"`
	CTime string `gorm:"column:ctime" form:"ctime" json:"-"`
	MTime string `gorm:"column:mtime" form:"mtime" json:"-"`
	Count int    `gorm:"-" form:"-" json:"count"`
}

Software for academy software.

func (*Software) TableName

func (s *Software) TableName() string

TableName get table name

type Tag

type Tag struct {
	ID       int64  `gorm:"column:id"`
	ParentID int64  `gorm:"column:parent_id"`
	Type     int8   `gorm:"column:type"`
	State    int8   `gorm:"column:state"`
	Business int8   `gorm:"column:business"`
	Name     string `gorm:"column:name"`
	Desc     string `gorm:"column:desc"`
	CTime    string `gorm:"column:ctime"`
	MTime    string `gorm:"column:mtime"`
	Rank     int64  `gorm:"column:rank"`
	Children []*Tag `json:"children,omitempty"`
}

Tag for academy tag.

func (*Tag) TableName

func (t *Tag) TableName() string

TableName get table name

type TagLink struct {
	ID     int64  `gorm:"column:id"  form:"id" json:"id"`
	TID    int64  `gorm:"column:tid" form:"tid" json:"tid"`
	LinkID int64  `gorm:"column:link_id" form:"link_id" json:"link_id"`
	CTime  string `gorm:"column:ctime"   form:"ctime"  json:"-"`
	MTime  string `gorm:"column:mtime"   form:"mtime" json:"-"`
}

TagLink for academy h5 tag relation to web tags.

func (*TagLink) TableName

func (s *TagLink) TableName() string

TableName get table name

type TagMeta

type TagMeta struct {
	ID       int64      `json:"id"`
	ParentID int64      `json:"parent_id"`
	Type     int8       `json:"type"`
	State    int8       `json:"state"`
	Business int8       `json:"business"`
	Count    int        `json:"count"`
	Name     string     `json:"name"`
	Desc     string     `json:"desc"`
	Children []*TagMeta `json:"children,omitempty"`
	Rank     int64      `gorm:"column:rank"`
	LinkID   []int64    `json:"link_id,omitempty"`
}

TagMeta for academy tag reuslt.

Jump to

Keyboard shortcuts

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