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"`
IsPublish *bool `json:"isPublish"`
PublishedAt *time.Time `json:"publishedAt"`
IsActive *bool `json:"isActive"`
}
func (req ArticleCategoriesUpdateRequest) ToEntity() *entity.ArticleCategories {
@ -67,6 +68,7 @@ func (req ArticleCategoriesUpdateRequest) ToEntity() *entity.ArticleCategories {
Slug: req.Slug,
Tags: req.Tags,
StatusId: req.StatusId,
IsActive: req.IsActive,
IsPublish: req.IsPublish,
PublishedAt: req.PublishedAt,
UpdatedAt: time.Now(),

View File

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

View File

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

View File

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

View File

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