From c61404a68ba33103eab7032950f639575c219993 Mon Sep 17 00:00:00 2001 From: linuxMate Date: Tue, 12 Dec 2023 20:23:33 +0300 Subject: [PATCH] cd --- .../microservices/category/category_models.go | 28 +++++++++---------- internal/models/category.go | 16 +++++------ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/internal/microservices/category/category_models.go b/internal/microservices/category/category_models.go index b101bc0a..de3a214c 100644 --- a/internal/microservices/category/category_models.go +++ b/internal/microservices/category/category_models.go @@ -5,23 +5,23 @@ import "github.com/google/uuid" // input output models type ( TagInput struct { - UserId uuid.UUID `json:"user_id"` - ParentId uuid.UUID `json:"parent_id"` - Image int `json:"image_id"` - Name string `json:"name"` - ShowIncome bool `json:"show_income"` - ShowOutcome bool `json:"show_outcome"` - Regular bool `json:"regular"` + UserId uuid.UUID `json:"user_id"` + ParentId uuid.UUID `json:"parent_id"` + // Image int `json:"image_id"` + Name string `json:"name"` + ShowIncome bool `json:"show_income"` + ShowOutcome bool `json:"show_outcome"` + Regular bool `json:"regular"` } TagUpdateInput struct { - UserID uuid.UUID `json:"user_id" valid:"required"` - ParentID uuid.UUID `json:"parent_id" valid:"-"` - Image int `json:"image_id"` - Name string `json:"name" valid:"required"` - ShowIncome bool `json:"show_income" valid:"-"` - ShowOutcome bool `json:"show_outcome" valid:"-"` - Regular bool `json:"regular" valid:"-"` + UserID uuid.UUID `json:"user_id" valid:"required"` + ParentID uuid.UUID `json:"parent_id" valid:"-"` + // Image int `json:"image_id"` + Name string `json:"name" valid:"required"` + ShowIncome bool `json:"show_income" valid:"-"` + ShowOutcome bool `json:"show_outcome" valid:"-"` + Regular bool `json:"regular" valid:"-"` } TagDeleteInput struct { diff --git a/internal/models/category.go b/internal/models/category.go index 482dd7ff..d8361f98 100644 --- a/internal/models/category.go +++ b/internal/models/category.go @@ -6,14 +6,14 @@ import ( ) type Category struct { - ID uuid.UUID `json:"id" valid:"-"` - UserID uuid.UUID `json:"user_id" valid:"required"` - ParentID uuid.UUID `json:"parent_id" valid:"-"` - Image int `json:"image_id" valid:"-"` - Name string `json:"name" valid:"required"` - ShowIncome bool `json:"show_income" valid:"-"` - ShowOutcome bool `json:"show_outcome" valid:"-"` - Regular bool `json:"regular" valid:"-"` + ID uuid.UUID `json:"id" valid:"-"` + UserID uuid.UUID `json:"user_id" valid:"required"` + ParentID uuid.UUID `json:"parent_id" valid:"-"` + // Image int `json:"image_id" valid:"-"` + Name string `json:"name" valid:"required"` + ShowIncome bool `json:"show_income" valid:"-"` + ShowOutcome bool `json:"show_outcome" valid:"-"` + Regular bool `json:"regular" valid:"-"` } func (c *Category) CategoryValidate() error {