fix: update categories
This commit is contained in:
parent
bcb6326877
commit
3a8ebc6715
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -19927,6 +19927,9 @@ const docTemplate = `{
|
|||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"isActive": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isPublish": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -19916,6 +19916,9 @@
|
|||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"isActive": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isPublish": {
|
||||
"type": "boolean"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -375,6 +375,8 @@ definitions:
|
|||
type: string
|
||||
id:
|
||||
type: integer
|
||||
isActive:
|
||||
type: boolean
|
||||
isPublish:
|
||||
type: boolean
|
||||
parentId:
|
||||
|
|
|
|||
Loading…
Reference in New Issue