dto

package
v0.0.0-...-4e0909e Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectDto

type CollectDto struct {
	UserId    int  `json:"user-id,omitempty" form:"user-id"`
	VideoId   int  `json:"video-id,omitempty" form:"video-id"`
	IsCollect bool `json:"is-like,omitempty" form:"is-like"`
}

func (*CollectDto) ToCollect

func (dto *CollectDto) ToCollect(uu *PO.CollectVideo) error

func (*CollectDto) ToDto

func (dto *CollectDto) ToDto(uu *PO.CollectVideo) error

type CommentDto

type CommentDto struct {
	UserId    int
	UserName  string `json:"user-name" form:"user-name"`
	VideoId   int64  `json:"video-id,omitempty" form:"video-id"`
	Content   string `json:"content" form:"content"`
	Level     int8   `json:"level" form:"level"`
	ParentId  int    `json:"parent-id" form:"parent-id"`
	Likes     int    `json:"likes" form:"likes"`
	IsLike    bool   `json:"is-like,omitempty" form:"is-like"`
	CreatedAt time.Time
}

func (*CommentDto) ToComment

func (dto *CommentDto) ToComment(uu *PO.Comment) error

func (*CommentDto) ToDto

func (dto *CommentDto) ToDto(uu *PO.Comment) error

type LikeDto

type LikeDto struct {
	UserId  int  `json:"user-id,omitempty" form:"user-id"`
	VideoId int  `json:"video-id,omitempty" form:"video-id"`
	IsLike  bool `json:"is-like,omitempty" form:"is-like"`
}

func (*LikeDto) ToDto

func (dto *LikeDto) ToDto(uu *PO.LikeVideo) error

func (*LikeDto) ToLike

func (dto *LikeDto) ToLike(uu *PO.LikeVideo) error

type VideoDto

type VideoDto struct {
	Id          int64  `json:"id" form:"id"`
	Title       string `json:"title" form:"title"`
	Url         string `json:"url" form:"url"`
	Tag         string `json:"tag" form:"tag"`
	Location    string `json:"location" form:"location"`
	Channel     string `json:"channel" form:"channel"`
	Description string `json:"description" form:"description"`
	Cover       string `json:"cover"`
	Status      int8   `json:"status" form:"status"`
}

func (*VideoDto) ToDto

func (v *VideoDto) ToDto(video *PO.Video) error

func (*VideoDto) ToVideo

func (v *VideoDto) ToVideo(video *PO.Video) error

type VideoShowDto

type VideoShowDto struct {
	Video    VideoDto `json:"video" form:"video"`
	UserId   int      `json:"user-id" ` //copier:"user-id"
	UserName string   `json:"user-name"`
	Avatar   string   `json:"avatar"`
	IsLike   bool     `json:"is-like"`
	IsFollow bool     `json:"is-follow"`
	Likes    int      `json:"likes"`
	Comments int      `json:"comments"`
	Collects int      `json:"collects"`
	Forwards int      `json:"forwards"`
}

Jump to

Keyboard shortcuts

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