commentdto

package
v0.0.0-...-5e0b955 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentAuthor

type CommentAuthor struct {
	AuthorID     int64   `json:"author_id"`
	Username     string  `json:"username"`
	Bio          *string `json:"bio,omitempty"`
	ProfileImage string  `json:"profile_image"`
}

article author 구조체가 있어도 분리

type CreateCommentRequestDTO

type CreateCommentRequestDTO struct {
	Body string `json:"body"`
}

type CreateCommentResponseDTO

type CreateCommentResponseDTO struct {
	ID        int64         `json:"comment_id"`
	Body      string        `json:"body"`
	Author    CommentAuthor `json:"author"`
	CreatedAt time.Time     `json:"created_at"`
}

type CreateCommentResponseWrapperDTO

type CreateCommentResponseWrapperDTO struct {
	Comment CreateCommentResponseDTO `json:"comment"`
}

type ReadCommentsResponseDTO

type ReadCommentsResponseDTO struct {
	ID        int64         `json:"comment_id"`
	Body      string        `json:"body"`
	Author    CommentAuthor `json:"author"`
	CreatedAt time.Time     `json:"created_at"`
	UpdatedAt *time.Time    `json:"updated_at,omitempty"`
}

type ReadCommentsResponseWrapperDTO

type ReadCommentsResponseWrapperDTO struct {
	Comments []ReadCommentsResponseDTO `json:"comments"`
}

type UpdateCommentRequestDTO

type UpdateCommentRequestDTO struct {
	Body string `json:"body"`
}

type UpdateCommentResponseDTO

type UpdateCommentResponseDTO struct {
	ID        int64         `json:"comment_id"`
	Body      string        `json:"body"`
	Author    CommentAuthor `json:"author"`
	CreatedAt time.Time     `json:"created_at"`
	UpdatedAt *time.Time    `json:"updated_at,omitempty"`
}

type UpdateCommentResponseWrapperDTO

type UpdateCommentResponseWrapperDTO struct {
	Comment UpdateCommentResponseDTO `json:"comment"`
}

Jump to

Keyboard shortcuts

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