model

package
v0.0.0-...-76c6153 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthorPost

type AuthorPost struct {
	Post Post     `json:"post"`
	Tags []string `json:"tags"`
}

type CachedUser

type CachedUser struct {
	ID          uuid.UUID `json:"id"`
	Username    string    `json:"username"`
	DisplayName *string   `json:"display_name"`
	AvatarURL   *string   `json:"avatar_url"`
}

type Comment

type Comment struct {
	ID        int64     `json:"id"`
	ParentID  *int64    `json:"parent_id"`
	PostID    int64     `json:"post_id"`
	AuthorID  uuid.UUID `json:"author_id"`
	Content   string    `json:"content"`
	Likes     int64     `json:"likes"`
	CreatedAt time.Time `json:"created_at"`
}

type FullComment

type FullComment struct {
	Comment Comment    `json:"comment"`
	Author  UserAuthor `json:"author"`
}

type FullPost

type FullPost struct {
	Post   Post       `json:"post"`
	Author UserAuthor `json:"author"`
	Tags   []string   `json:"tags"`
}

type Post

type Post struct {
	ID                  int64     `json:"id"`
	AuthorID            uuid.UUID `json:"author_id"`
	Title               string    `json:"title"`
	Content             string    `json:"content"`
	FeedView            string    `json:"feed_view"`
	Views               int64     `json:"views"`
	Likes               int64     `json:"likes"`
	CreatedAt           time.Time `json:"created_at"`
	UpdatedAt           time.Time `json:"updated_at"`
	Validated           bool      `json:"validated"`
	ValidationStatusMsg *string   `json:"validation_status_msg"`
}

type UserAuthor

type UserAuthor struct {
	Username    string  `json:"username"`
	DisplayName *string `json:"display_name"`
	AvatarURL   *string `json:"avatar_url"`
}

Jump to

Keyboard shortcuts

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