dto

package
v0.0.0-...-83330ae Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 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 AuthRequest

type AuthRequest struct {
	Email       string `json:"email" binding:"required,email"`
	Password    string `json:"password" binding:"required,min=8"`
	FullName    string `json:"full_name" binding:"required,max=255"`
	DateOfBirth string `json:"date_of_birth" binding:"required,max=255"`
}

type AuthResponse

type AuthResponse struct {
	ID          string `json:"id"`
	Email       string `json:"email"`
	FullName    string `json:"full_name"`
	DateOfBirth string `json:"date_of_birth"`
}

type ChatRequest

type ChatRequest struct {
	Message string `json:"message" binding:"required"`
}

type ChatResponse

type ChatResponse struct {
	ID        int       `json:"id"`
	Message   string    `json:"message"`
	Response  string    `json:"response"`
	CreatedAt time.Time `json:"created_at"`
}

type CheckIsPregnant

type CheckIsPregnant struct {
	ProfileType float64 `form:"profile-type" binding:"required"`
}

type CurrentNutritionsResponse

type CurrentNutritionsResponse struct {
	CurrentCalories      float64 `json:"current_calories"`
	CurrentCarbohydrates float64 `json:"current_carbohydrates"`
	CurrentProtein       float64 `json:"current_protein"`
	MaxProtein           float64 `json:"max_protein"`
	MaxCarbohydrates     float64 `json:"max_carbohydrates"`
	MaxCalories          float64 `json:"max_calories"`
}

type GenerateNutritionRequest

type GenerateNutritionRequest struct {
	Picture *multipart.FileHeader `form:"picture" binding:"required"`
}

type GenerateNutritionsResponse

type GenerateNutritionsResponse struct {
	FoodName     string  `json:"food_name"`
	Calories     float64 `json:"calories"`
	Carbohidrate float64 `json:"carbohydrates"`
	Protein      float64 `json:"protein"`
	Recommended  bool    `json:"recommended_for_pregnant_children"`
	Description  string  `json:"description"`
}

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email" binding:"required,email"`
	Password string `json:"password" binding:"required,min=8"`
}

type LoginResponse

type LoginResponse struct {
	Token     string    `json:"token"`
	ExpiresAt time.Time `json:"expires_at"`
}

type NonPregnantProfileResponse

type NonPregnantProfileResponse struct {
	Id              string    `json:"id"`
	UserID          string    `json:"user_id"`
	ProfileName     string    `json:"profile_name"`
	IsPregnant      bool      `json:"is_pregnant"`
	BirthDate       time.Time `json:"birth_date"`
	Height          float64   `json:"height"`
	Weight          float64   `json:"weight"`
	ChildAgeInDay   int       `json:"child_age_in_day"`
	ChildAgeInWeek  int       `json:"child_age_in_week"`
	ChildAgeInMonth int       `json:"child_age_in_month"`
	ChildAgeInYear  int       `json:"child_age_in_year"`
}

type NutritionsRequest

type NutritionsRequest struct {
	Picture      *multipart.FileHeader `form:"picture" binding:"required"`
	FoodName     string                `form:"food_name" binding:"required"`
	Calories     float64               `form:"calories" binding:"required"`
	Carbohidrate float64               `form:"carbohydrates" binding:"required"`
	Protein      float64               `form:"protein" binding:"required"`
}

type NutritionsResponse

type NutritionsResponse struct {
	ID          string `json:"id"`
	FoodName    string `json:"food_name"`
	PictureLink string `json:"picture_link"`
}

type PregnantProfileResponse

type PregnantProfileResponse struct {
	Id                 string    `json:"id"`
	UserID             string    `json:"user_id"`
	ProfileName        string    `json:"profile_name"`
	IsPregnant         bool      `json:"is_pregnant"`
	PregnantDate       time.Time `json:"pregnant_date"`
	PregnantAgeInDay   int       `json:"pregnant_age_in_day"`
	PregnantAgeInWeek  int       `json:"pregnant_age_in_week"`
	PregnantAgeInMonth int       `json:"pregnant_age_in_month"`
}

type ProfileListResponse

type ProfileListResponse struct {
	ID          string `json:"id"`
	UserID      string `json:"user_id"`
	IsPregnant  bool   `json:"is_pregnant"`
	ProfileName string `json:"profile_name"`
}

type RegisterProfileNotPregnantRequest

type RegisterProfileNotPregnantRequest struct {
	UserID      string `json:"user_id" binding:"required"`
	IsPregnant  bool
	ProfileName string  `json:"profile_name" binding:"required"`
	BirthDate   string  `json:"birth_date" binding:"required"`
	Weight      float64 `json:"weight" binding:"required"`
	Height      float64 `json:"height" binding:"required"`
}

type RegisterProfilePregnantRequest

type RegisterProfilePregnantRequest struct {
	UserID       string `json:"user_id" binding:"required"`
	IsPregnant   bool
	ProfileName  string `json:"profile_name" binding:"required"`
	PregnantDate string `json:"pregnant_date" binding:"required"`
}

type RegisterProfileResponse

type RegisterProfileResponse struct {
	ID         string `json:"id"`
	UserID     string `json:"user_id"`
	IsPregnant bool   `json:"is_pregnant"`
}

type UserTokenData

type UserTokenData struct {
	ProfileId   string  `json:"profile_id"`
	ID          string  `json:"user_id"`
	Email       string  `json:"email"`
	RoleId      float64 `json:"role_id"`
	ProfileType float64 `json:"profile_type"`
}

Jump to

Keyboard shortcuts

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