dtos

package
v0.0.0-...-771bf79 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 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 BookDTO

type BookDTO struct {
	Id              primitive.ObjectID `json:"_id,omitempty"`
	Author          string             `json:"author"`
	ISBN            string             `json:"ISBN"`
	Name            string             `json:"name"`
	CoverImageURL   string             `json:"cover_image_url"`
	Edition         string             `json:"edition"`
	Pages           int                `json:"pages"`
	Language        string             `json:"language"`
	PublicationDate time.Time          `json:"publication_date"`
	Publisher       string             `json:"publisher"`
	Description     string             `json:"description"`
	Genres          []string           `json:"genres"`
}

type BookInsertDTO

type BookInsertDTO struct {
	Author          string    `json:"author" validate:"required"`
	ISBN            string    `json:"ISBN" `
	Name            string    `json:"name" validate:"required"`
	CoverImageURL   string    `json:"cover_image_url"`
	Edition         string    `json:"edition"`
	Pages           int       `json:"pages" validate:"required"`
	Language        string    `json:"language" validate:"required"`
	PublicationDate time.Time `json:"publication_date"`
	Publisher       string    `json:"publisher"`
	Description     string    `json:"description"`
	Genres          []string  `json:"genres"`
}

type ClientReadingInsertDTO

type ClientReadingInsertDTO struct {
	ReadingType     string                 `json:"reading_type"`
	ReadingsRecords []models.ReadingRecord `json:"reading_records"`
	ReadingStatus   string                 `json:"reading_status"`
	Notes           string                 `json:"notes"`
}

type CustomDocumentDTO

type CustomDocumentDTO struct {
	Id          primitive.ObjectID `bson:"_id,omitempty"`
	Title       string             `bson:"title"`
	Author      string             `bson:"author"`
	Description string             `bson:"description"`
	Content     string             `bson:"content"`
	FileURL     string             `bson:"file_url"`
	URL         string             `bson:"url"`
	Tags        []string           `bson:"tags"`
	Category    string             `bson:"category"`
	Version     string             `bson:"version"`
	Status      string             `bson:"status"`
}

type CustomDocumentInsertDTO

type CustomDocumentInsertDTO struct {
	Title       string   `bson:"title" validate:"required"`
	Author      string   `bson:"author" validate:"required"`
	Description string   `bson:"description" validate:"omitempty,max=200"`
	Content     string   `bson:"content" validate:"omitempty"`
	FileURL     string   `bson:"file_url" validate:"omitempty,url"`
	URL         string   `bson:"url" validate:"omitempty,url"`
	Tags        []string `bson:"tags" validate:"omitempty,dive,max=50"`
	Category    string   `bson:"category" validate:"omitempty"`
	Version     string   `bson:"version" validate:"omitempty"`
	Status      string   `bson:"status" validate:"omitempty,oneof='draft' 'published' 'archived'"`
}

type LoginDTO

type LoginDTO struct {
	LoginIdentfier string `json:"login_identifier" validate:"required"` //username or email
	Password       string `json:"password" validate:"required"`
}

type MangaDTO

type MangaDTO struct {
	Id              primitive.ObjectID `json:"_id,omitempty"`
	Title           string             `json:"title"`
	Author          string             `json:"author"`
	CoverImageURL   string             `json:"cover_image_url"`
	Volume          int                `json:"volume"`
	Chapters        int                `json:"chapters"`
	Demogragphy     string             `json:"demograhpy"`
	Genres          []string           `json:"genres"`
	PublicationDate time.Time          `json:"publication_date"`
	Publisher       string             `json:"publisher"`
	Description     string             `json:"description"`
}

type MangaInsertDTO

type MangaInsertDTO struct {
	Title           string    `json:"title" validate:"required"`
	Author          string    `json:"author" validate:"required"`
	CoverImageURL   string    `json:"cover_image_url"`
	Volume          int       `json:"volume" validate:"required"`
	Chapters        int       `json:"chapters" validate:"required"`
	Demogragphy     string    `json:"demograhpy" validate:"required"`
	Genres          []string  `json:"genres" validate:"required"`
	PublicationDate time.Time `json:"publication_date"`
	Publisher       string    `json:"publisher"`
	Description     string    `json:"description"`
}

type ProfileDTO

type ProfileDTO struct {
	FullName        string `bson:"full_name"`
	Biography       string `bson:"biography"`
	ProfileImageURL string `bson:"profile_image_url"`
	ProfileCoverURL string `bson:"profile_cover_url"`
}

type ProfileInsertDTO

type ProfileInsertDTO struct {
	FirstName       string `json:"first_name"  validate:"required,min=3"`
	LastName        string `json:"last_name" validate:"required,min=3"`
	Biography       string `json:"biography"`
	ProfileImageURL string `json:"profile_image_url"`
	ProfileCoverURL string `json:"profile_cover_url"`
}

type ReadingDTO

type ReadingDTO struct {
	Id            primitive.ObjectID `json:"id"`
	UserId        string             `json:"client_id"`
	Reading       string             `json:"reading_name"`
	ReadingType   string             `json:"reading_type"`
	ReadingStatus string             `json:"reading_status"`
	Notes         string             `json:"notes"`
	UpdatedAt     time.Time          `json:"last_update"`
	RecordsDTOs   []ReadingRecordDTO `json:"records"`
}

type ReadingInsertDTO

type ReadingInsertDTO struct {
	ReadingType   string             `json:"reading_type" validate:"required,oneof=manga book custom_document"`
	DocumentId    primitive.ObjectID `json:"document_id"  validate:"required"`
	ReadingStatus string             `json:"reading_status" validate:"required,oneof=ongoing completed paused"`
	Notes         string             `json:"notes"`
}

type ReadingListDTO

type ReadingListDTO struct {
	Id          primitive.ObjectID   `json:"_id,omitempty"`
	ReadingIds  []primitive.ObjectID `json:"reading_ids"`
	Name        string               `json:"name"`
	Description string               `json:"description"`
}

type ReadingListInsertDTO

type ReadingListInsertDTO struct {
	Name        string `json:"name" validate:"required"`
	Description string `json:"description"`
}

type ReadingRecordDTO

type ReadingRecordDTO struct {
	Id         primitive.ObjectID `json:"id"`
	Progress   string             `json:"progress"`
	Notes      string             `json:"notes"`
	RecordDate time.Time          `bson:"update_date"`
}

type ReadingRecordInsertDTO

type ReadingRecordInsertDTO struct {
	ReadingId primitive.ObjectID `json:"reading_id" validate:"required"`
	Progress  string             `json:"progress" validate:"required"`
	Notes     string             `json:"notes" validate:"required"`
}

type SignupDTO

type SignupDTO struct {
	Username            string           `json:"username" validate:"required,min=3,max=32"`
	Email               string           `json:"email" validate:"required,email"`
	Password            string           `json:"password" validate:"required,min=8"`
	ProprofileInsertDTO ProfileInsertDTO `json:"profile_insert_dto"`
}

type UpdateReadingsToListDTO

type UpdateReadingsToListDTO struct {
	ReadingIds    []primitive.ObjectID `json:"reading_ids" validate:"required"`
	ReadingListId primitive.ObjectID   `json:"reading_list_id" validate:"required"`
}

type UserDTO

type UserDTO struct {
	Id       primitive.ObjectID `bson:"_id"`
	Username string             `bson:"username"`
	Email    string             `bson:"email"`
	Password string             `bson:"password"`
	Profile  ProfileDTO         `bson:"profile"`
	Roles    []string           `bson:"roles"`
}

type UserInsertDTO

type UserInsertDTO struct {
	Username string `bson:"username" validate:"required,min=3,max=32"`
	Email    string `bson:"email" validate:"required,email"`
	Password string `bson:"password" validate:"required,min=8"`
}

Jump to

Keyboard shortcuts

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