model

package
v0.0.0-...-70948f9 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllStatus = iota
	CheckStatus
	SuccessStatus
	FailStatus
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminInput

type AdminInput struct {
	Username string
	Password string
	Nickname string
	Avatar   string
}

type ArticleGrpInput

type ArticleGrpInput struct {
	Name        string
	Tags        string
	Description string
	Onshow      bool
	Order       int
}

type ArticleInput

type ArticleInput struct {
	GrpId       Id
	Title       string
	Author      string
	Thumb       string
	Tags        string
	Description string
	Content     string
	Order       int
	Ontop       uint
	Onshow      uint
	Hist        uint
	Post        uint
}

type ArticleQuery

type ArticleQuery struct {
	Paging
	GrpId  Id
	Search string
	Onshow bool
	IsDel  bool
}

type FileInfo

type FileInfo struct {
	Name string `json:"name" dc:"文件名称"`
	Url  string `json:"path" dc:"文件URL"`
	Dir  string `json:"-" dc:"文件DIR"` // dir不能暴露到外部,他包含着服务器的目录结构
}

type Id

type Id uint32

Id 主键类型

type IdInput

type IdInput struct {
	Id Id `json:"id" v:"required|integer|between:1,4294967295"`
}

IdInput 公共Id input,一般用作api中的upd和del

type LinkInput

type LinkInput struct {
	Name        string `json:"name" v:"required|length:1, 20"`
	Description string `json:"description" v:"length:2, 200"`
	Link        string `json:"link" v:"required|length:1, 200"`
}

type LoginInput

type LoginInput struct {
	Username string
	Password string
}

type Out

type Out bool

Out 标记剔除字段

type Paging

type Paging struct {
	Page int `v:"integer|between:1,9999999" json:"page" dc:"查询分页:页码,默认1"`
	Size int `v:"integer|between:1,100" json:"size" dc:"查询分页:条数,默认15"`
}

Paging 分页查询条件

type ReplyBody

type ReplyBody struct {
	Name    string `json:"name" v:"required|length:1,20"`
	Email   string `json:"email" v:"required|email|length:1,100"`
	Site    string `json:"site" v:"url|length:1,50"`
	Content string `json:"content" v:"required|length:2, 100000"`
}

ReplyBody 回复内容主体

type ReplyFloorApp

type ReplyFloorApp struct {
	Id        Id              `json:"id"        description:""`
	Pid       Id              `json:"pid"       description:"回复父id"`
	PName     string          `json:"pName"     description:"回复父名称"`
	Email     string          `json:"email"     description:"回复人邮箱"`
	Name      string          `json:"name"      description:"回复人名称"`
	Site      string          `json:"site"      description:"回复人网站"`
	Content   string          `json:"content"   description:"回复内容"`
	CreatedAt *gtime.Time     `json:"createdAt" description:"创建时间"`
	UpdatedAt *gtime.Time     `json:"updatedAt" description:"更新时间"`
	List      []ReplyFloorApp `json:"list"      description:"子回复列表"`
}

ReplyFloorApp 回复楼,是一个二维结构

type ReplyInput

type ReplyInput struct {
	ReplyInputApp
	Status ReplyStatus `json:"status" v:"in:1,2,3" dc:"审核状态,1待审核 2审核通过 3审核失败,默认2"`
}

ReplyInput 新增回复,多了Status

type ReplyInputApp

type ReplyInputApp struct {
	ReplyBody
	Aid Id `json:"aid" v:"required|integer|between:1,4294967295"`
	Pid Id `json:"pid" v:"required|integer|between:0,4294967295" dc:"如果传入pid,aid会自动跟随父回复"`
}

ReplyInputApp App新增回复

type ReplyQuery

type ReplyQuery struct {
	Paging
	Aid    Id          `json:"aid" v:"integer|between:1,4294967295"`
	Status ReplyStatus `json:"status" v:"in:1,2,3" dc:"查询状态,1待审核 2审核通过 3审核失败	,不传则查询所有"`
	Search string      `v:"length: 1,30" json:"search" dc:"查询文本,会检索名称,邮箱,内容"`
}

type ReplyShow

type ReplyShow struct {
	ArticleTitle string       `json:"articleTitle" dc:"回复的文章标题"`
	ParentReply  entity.Reply `json:"parentReply" dc:"父级回复"`
	entity.Reply
}

type ReplyStatus

type ReplyStatus uint8

ReplyStatus 回复审核状态

type SentenceInput

type SentenceInput struct {
	Id       Id
	BookId   Id
	TagIds   []Id
	Sentence string
}

type SentenceQuery

type SentenceQuery struct {
	Paging
	BookId Id
	// 根据指定id查询
	Ids    []Id
	Search string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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