dto

package
v0.0.0-...-244d273 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchReviews

type BatchReviews struct {
	UserIds []string `json:"userIds"`
}

func NewBatchReviews

func NewBatchReviews(reqBody string) (*BatchReviews, error)

func (BatchReviews) Validate

func (c BatchReviews) Validate() string

type BatchReviewsDto

type BatchReviewsDto struct {
	Users []*UserReviewDetail `json:"users"`
}

func BatchReviewsDtoFromModel

func BatchReviewsDtoFromModel(items []*review.ReviewModel) *BatchReviewsDto

type CreateReview

type CreateReview struct {
	Rate    uint8  `json:"rate"`
	Review  string `json:"review"`
	Type    string `json:"type"`
	User    string `json:"user"`
	From    string `json:"from"`
	Session string `json:"session,omitempty"`
}

func NewCreateReview

func NewCreateReview(reqBody string) (*CreateReview, error)

func (*CreateReview) ToReviewModel

func (c *CreateReview) ToReviewModel() *review.ReviewModel

func (CreateReview) Validate

func (c CreateReview) Validate() string

type GetUserReviewsDto

type GetUserReviewsDto struct {
	Reviews       []*ReviewDto `json:"reviews"`
	CustomReviews []*ReviewDto `json:"customReviews"`
	UserId        string       `json:"userId"`
	AverageRate   uint8        `json:"averageRate"`
}

func UserReviewsDtoFromModel

func UserReviewsDtoFromModel(items []*review.ReviewModel) *GetUserReviewsDto

type ReviewDto

type ReviewDto struct {
	PK      string `json:"pk"`
	SK      string `json:"sk"`
	Rate    uint8  `json:"rate"`
	Review  string `json:"review"`
	User    string `json:"user"`
	From    string `json:"from"`
	Date    string `json:"date"`
	Session string `json:"session,omitempty"`
}

func ReviewDtoFromModel

func ReviewDtoFromModel(r *review.ReviewModel) *ReviewDto

type UserReviewDetail

type UserReviewDetail struct {
	BestCustomReview *ReviewDto `json:"bestCustomReview"`
	UserId           string     `json:"userId"`
	AverageRate      uint8      `json:"averageRate"`
}

Jump to

Keyboard shortcuts

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