models

package
v0.0.0-...-73f3dc2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 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 Category

type Category struct {
	ID           int    `json:"id"`
	PostID       int    `json:"post_id"`
	CategoryName string `json:"category"`
}

Category model

type Post

type Post struct {
	ID           int        `json:"id"`
	UserID       int        `json:"user_id"`
	UserName     string     `json:"username"`
	PostTitle    string     `json:"post_title"`
	Body         string     `json:"body"`
	ParentID     *int       `json:"parent_id"`
	CreatedOn    time.Time  `json:"created_on"`
	PostStatus   string     `json:"post_status"`
	Likes        int        `json:"likes"`
	Dislikes     int        `json:"dislikes"`
	CommentCount int        `json:"comment_count"`
	Categories   []Category `json:"categorie"`
	MediaURL     string     `json:"imageurl"`
	Comments     []Post     `json:"comments"`
}

Post model

type Reaction

type Reaction struct {
	ID             int    `json:"id"`
	Reaction       string `json:"reaction"`
	ReactionStatus string `json:"reaction_status"`
	UserID         int    `json:"user_id"`
	PostID         int    `json:"post_id"`
}

Reaction model

type User

type User struct {
	ID                int       `json:"id"`
	Username          string    `json:"username"`
	Email             string    `json:"email"`
	Password          string    `json:"password,omitempty"`
	ConfirmedPassword string    `json:"confirmed-password"`
	JoinedOn          time.Time `json:"joined_on"`
}

User model

Jump to

Keyboard shortcuts

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