models

package
v0.0.0-...-23be0e1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	ID            int
	AuthorID      int
	User          User
	ParentID      int
	ChildComments []*Comment
	Slug          string
	Body          string
	CreatedAt     time.Time
	UpdatedAt     time.Time
	IsHidden      bool

	Total int64
}

func (*Comment) Validate

func (c *Comment) Validate() error

type CommentFilter

type CommentFilter struct {
	ID        int
	Slug      string
	AuthorID  int
	IsVisible bool

	Limit  int
	Offset int
}

type Post

type Post struct {
	ID             int
	Title          string
	Slug           string
	Poster         string
	Tags           []string
	Short          string
	Body           string
	AuthorID       int
	AuthorUserName string
	PublishedAt    *time.Time
	CreatedAt      time.Time
	UpdatedAt      time.Time
	IsEditorsPick  bool

	Total int64
}

func (*Post) Validate

func (p *Post) Validate() error

type PostFilter

type PostFilter struct {
	ID                 int
	Slug               string
	IsPublished        bool
	InPublicationOrder bool
	IsEditorsPick      bool

	Limit  int
	Offset int
}

type PostUpdateParam

type PostUpdateParam struct {
	ID    int
	Title *string
	Slug  *string
}

type User

type User struct {
	ID                  int
	Username            string
	Email               string
	Password            string
	Roles               []string
	EmailToken          string
	CreatedAt           time.Time
	UpdatedAt           time.Time
	SendVerifiedEmailAt time.Time
	ResetPasswordToken  string
	RPTExpiredAt        time.Time
	IsBlocked           bool

	Total int64
}

type UserFilter

type UserFilter struct {
	ID                 int
	Username           string
	Email              string
	EmailToken         string
	ResetPasswordToken string

	Limit  int
	Offset int
}

Jump to

Keyboard shortcuts

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