repositories

package
v0.0.0-...-d40ce77 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Avatar

type Avatar struct {
	// Schema
	// @title http schema
	// @description http schema
	Schema string `json:"schema"`
	// Domain
	// @title domain
	// @description domain
	Domain string `json:"domain"`
	// Path
	// @title uri path
	// @description uri path
	Path string `json:"path"`
	// MimeType
	// @title mime type
	// @description mime type
	MimeType string `json:"mimeType"`
	// URL
	// @title url
	// @description full url
	URL string `json:"url"`
}

Avatar @title Avatar @description Avatar info

type PostCommentRow

type PostCommentRow struct {
	Id       int64     `column:"ID,pk,incr" json:"ID"`
	PostId   string    `column:"POST_ID" json:"POST_ID"`
	User     UserRow   `column:"USER_ID,ref,Id" json:"USER"`
	CreateAT time.Time `column:"CREATE_AT,act" json:"CREATE_AT"`
	Content  string    `column:"CONTENT" json:"CONTENT"`
}

func (PostCommentRow) TableInfo

func (row PostCommentRow) TableInfo() dac.TableInfo

type PostCommentRows

type PostCommentRows []PostCommentRow

type PostLikeRow

type PostLikeRow struct {
	Id     int64  `column:"ID,pk,incr" json:"ID"`
	PostId string `column:"POST_ID" json:"POST_ID"`
	UserId string `column:"USER_ID" json:"USER_ID"`
}

func (PostLikeRow) TableInfo

func (row PostLikeRow) TableInfo() dac.TableInfo

type PostRow

type PostRow struct {
	Id       string          `column:"ID,pk" json:"ID"`
	User     UserRow         `column:"USER_ID,ref,Id" json:"USER"`
	CreateAT time.Time       `column:"CREATE_AT,act" json:"CREATE_AT"`
	Version  int64           `column:"VERSION,aol" json:"VERSION"`
	Title    string          `column:"TITLE" json:"TITLE"`
	Content  string          `column:"CONTENT" json:"CONTENT"`
	Comments PostCommentRows `column:"COMMENTS,links,Id+PostId,orders:Id@desc,length:10" json:"COMMENTS"`
	Likes    int64           `column:"LIKES,vc,basic,SELECT COUNT(1) FROM \"FNS\".\"POST_LIKE\" WHERE \"POST_ID\" = \"FNS\".\"POST\".\"ID\"" json:"LIKES"`
}

func (PostRow) TableInfo

func (row PostRow) TableInfo() dac.TableInfo

type UserGenderCount

type UserGenderCount struct {
	Gender string `column:"GENDER" json:"gender"`
	Count  int64  `column:"ID,vc,agg,COUNT" json:"count"`
}

func (UserGenderCount) ViewInfo

func (u UserGenderCount) ViewInfo() dac.ViewInfo

type UserRow

type UserRow struct {
	dac.Audit
	Nickname string               `column:"NICKNAME"`
	Mobile   string               `column:"MOBILE"`
	Gender   string               `column:"GENDER"`
	Birthday time.Time            `column:"BIRTHDAY"`
	Avatar   sql.NullJson[Avatar] `column:"AVATAR,json"`
	BD       times.Date           `column:"BD"`
	BT       times.Time           `column:"BT"`
	Comment  PostLikeRow          `column:"Comment,link,Id+UserId"`
}

func (UserRow) TableInfo

func (row UserRow) TableInfo() dac.TableInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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