fix: update categories

This commit is contained in:
Sabda Yagra 2026-02-05 16:10:22 +07:00
parent bcb6326877
commit 3a8ebc6715
5 changed files with 15 additions and 4 deletions

View File

@ -56,6 +56,7 @@ type ArticleCategoriesUpdateRequest struct {
CreatedById *uint `json:"createdById"` CreatedById *uint `json:"createdById"`
IsPublish *bool `json:"isPublish"` IsPublish *bool `json:"isPublish"`
PublishedAt *time.Time `json:"publishedAt"` PublishedAt *time.Time `json:"publishedAt"`
IsActive *bool `json:"isActive"`
} }
func (req ArticleCategoriesUpdateRequest) ToEntity() *entity.ArticleCategories { func (req ArticleCategoriesUpdateRequest) ToEntity() *entity.ArticleCategories {
@ -67,6 +68,7 @@ func (req ArticleCategoriesUpdateRequest) ToEntity() *entity.ArticleCategories {
Slug: req.Slug, Slug: req.Slug,
Tags: req.Tags, Tags: req.Tags,
StatusId: req.StatusId, StatusId: req.StatusId,
IsActive: req.IsActive,
IsPublish: req.IsPublish, IsPublish: req.IsPublish,
PublishedAt: req.PublishedAt, PublishedAt: req.PublishedAt,
UpdatedAt: time.Now(), UpdatedAt: time.Now(),

View File

@ -2,10 +2,6 @@ package service
import ( import (
"context" "context"
"github.com/gofiber/fiber/v2"
"github.com/google/uuid"
"github.com/minio/minio-go/v7"
"github.com/rs/zerolog"
"io" "io"
"log" "log"
"math/rand" "math/rand"
@ -24,6 +20,11 @@ import (
"strconv" "strconv"
"strings" "strings"
"time" "time"
"github.com/gofiber/fiber/v2"
"github.com/google/uuid"
"github.com/minio/minio-go/v7"
"github.com/rs/zerolog"
) )
// ArticleCategoriesService // ArticleCategoriesService

View File

@ -19927,6 +19927,9 @@ const docTemplate = `{
"id": { "id": {
"type": "integer" "type": "integer"
}, },
"isActive": {
"type": "boolean"
},
"isPublish": { "isPublish": {
"type": "boolean" "type": "boolean"
}, },

View File

@ -19916,6 +19916,9 @@
"id": { "id": {
"type": "integer" "type": "integer"
}, },
"isActive": {
"type": "boolean"
},
"isPublish": { "isPublish": {
"type": "boolean" "type": "boolean"
}, },

View File

@ -375,6 +375,8 @@ definitions:
type: string type: string
id: id:
type: integer type: integer
isActive:
type: boolean
isPublish: isPublish:
type: boolean type: boolean
parentId: parentId: