feat: update articles filter and fields
This commit is contained in:
parent
fb6c8ca592
commit
5258f20df1
|
|
@ -7,39 +7,41 @@ import (
|
|||
)
|
||||
|
||||
type Articles struct {
|
||||
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
|
||||
Title string `json:"title" gorm:"type:varchar"`
|
||||
Slug string `json:"slug" gorm:"type:varchar"`
|
||||
Description string `json:"description" gorm:"type:varchar"`
|
||||
CategoryId int `json:"category_id" gorm:"type:int4"`
|
||||
HtmlDescription string `json:"html_description" gorm:"type:varchar"`
|
||||
TypeId int `json:"type_id" gorm:"type:int4"`
|
||||
Tags string `json:"tags" gorm:"type:varchar"`
|
||||
ThumbnailName *string `json:"thumbnail_name" gorm:"type:varchar"`
|
||||
ThumbnailPath *string `json:"thumbnail_path" gorm:"type:varchar"`
|
||||
PageUrl *string `json:"page_url" gorm:"type:varchar"`
|
||||
CreatedById *uint `json:"created_by_id" gorm:"type:int4"`
|
||||
AiArticleId *int `json:"ai_article_id" gorm:"type:int4"`
|
||||
CommentCount *int `json:"comment_count" gorm:"type:int4;default:0"`
|
||||
ShareCount *int `json:"share_count" gorm:"type:int4;default:0"`
|
||||
ViewCount *int `json:"view_count" gorm:"type:int4;default:0"`
|
||||
StatusId *int `json:"status_id" gorm:"type:int4"`
|
||||
OldId *uint `json:"old_id" gorm:"type:int4"`
|
||||
NeedApprovalFrom *int `json:"need_approval_from" gorm:"type:int4"`
|
||||
HasApprovedBy *string `json:"has_approved_by" gorm:"type:varchar"`
|
||||
WorkflowId *uint `json:"workflow_id" gorm:"type:int4"`
|
||||
CurrentApprovalStep *int `json:"current_approval_step" gorm:"type:int4;default:0"` // 0=not submitted, 1+=approval step
|
||||
ID uint `json:"id" gorm:"primaryKey;type:int4;autoIncrement"`
|
||||
Title string `json:"title" gorm:"type:varchar"`
|
||||
Slug string `json:"slug" gorm:"type:varchar"`
|
||||
Description string `json:"description" gorm:"type:varchar"`
|
||||
CategoryId int `json:"category_id" gorm:"type:int4"`
|
||||
HtmlDescription string `json:"html_description" gorm:"type:varchar"`
|
||||
TypeId int `json:"type_id" gorm:"type:int4"`
|
||||
Tags string `json:"tags" gorm:"type:varchar"`
|
||||
ThumbnailName *string `json:"thumbnail_name" gorm:"type:varchar"`
|
||||
ThumbnailPath *string `json:"thumbnail_path" gorm:"type:varchar"`
|
||||
PageUrl *string `json:"page_url" gorm:"type:varchar"`
|
||||
CreatedById *uint `json:"created_by_id" gorm:"type:int4"`
|
||||
AiArticleId *int `json:"ai_article_id" gorm:"type:int4"`
|
||||
CommentCount *int `json:"comment_count" gorm:"type:int4;default:0"`
|
||||
ShareCount *int `json:"share_count" gorm:"type:int4;default:0"`
|
||||
ViewCount *int `json:"view_count" gorm:"type:int4;default:0"`
|
||||
StatusId *int `json:"status_id" gorm:"type:int4"`
|
||||
OldId *uint `json:"old_id" gorm:"type:int4"`
|
||||
NeedApprovalFrom *int `json:"need_approval_from" gorm:"type:int4"`
|
||||
HasApprovedBy *string `json:"has_approved_by" gorm:"type:varchar"`
|
||||
WorkflowId *uint `json:"workflow_id" gorm:"type:int4"`
|
||||
CurrentApprovalStep *int `json:"current_approval_step" gorm:"type:int4;default:0"` // 0=not submitted, 1+=approval step
|
||||
// New fields for no-approval support
|
||||
BypassApproval *bool `json:"bypass_approval" gorm:"type:bool;default:false"` // true = skip approval process
|
||||
ApprovalExempt *bool `json:"approval_exempt" gorm:"type:bool;default:false"` // true = permanently exempt from approval
|
||||
IsPublish *bool `json:"is_publish" gorm:"type:bool;default:false"`
|
||||
IsBanner *bool `json:"is_banner" gorm:"type:bool;default:false"`
|
||||
PublishedAt *time.Time `json:"published_at" gorm:"type:timestamp"`
|
||||
IsDraft *bool `json:"is_draft" gorm:"type:bool;default:false"`
|
||||
DraftedAt *time.Time `json:"drafted_at" gorm:"type:timestamp"`
|
||||
PublishSchedule *string `json:"publish_schedule" gorm:"type:varchar"`
|
||||
ClientId *uuid.UUID `json:"client_id" gorm:"type:UUID"`
|
||||
IsActive *bool `json:"is_active" gorm:"type:bool;default:true"`
|
||||
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
|
||||
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
|
||||
BypassApproval *bool `json:"bypass_approval" gorm:"type:bool;default:false"` // true = skip approval process
|
||||
ApprovalExempt *bool `json:"approval_exempt" gorm:"type:bool;default:false"` // true = permanently exempt from approval
|
||||
IsPublish *bool `json:"is_publish" gorm:"type:bool;default:false"`
|
||||
IsBanner *bool `json:"is_banner" gorm:"type:bool;default:false"`
|
||||
PublishedAt *time.Time `json:"published_at" gorm:"type:timestamp"`
|
||||
IsDraft *bool `json:"is_draft" gorm:"type:bool;default:false"`
|
||||
DraftedAt *time.Time `json:"drafted_at" gorm:"type:timestamp"`
|
||||
PublishSchedule *string `json:"publish_schedule" gorm:"type:varchar"`
|
||||
Source *string `json:"source" gorm:"type:varchar"`
|
||||
CustomCreatorName *string `json:"custom_creator_name" gorm:"type:varchar"`
|
||||
ClientId *uuid.UUID `json:"client_id" gorm:"type:UUID"`
|
||||
IsActive *bool `json:"is_active" gorm:"type:bool;default:true"`
|
||||
CreatedAt time.Time `json:"created_at" gorm:"default:now()"`
|
||||
UpdatedAt time.Time `json:"updated_at" gorm:"default:now()"`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,16 +69,20 @@ func (_i *articlesController) All(c *fiber.Ctx) error {
|
|||
}
|
||||
|
||||
reqContext := request.ArticlesQueryRequestContext{
|
||||
Title: c.Query("title"),
|
||||
Description: c.Query("description"),
|
||||
Tags: c.Query("tags"),
|
||||
Category: c.Query("category"),
|
||||
CategoryId: c.Query("categoryId"),
|
||||
TypeId: c.Query("typeId"),
|
||||
StatusId: c.Query("statusId"),
|
||||
IsPublish: c.Query("isPublish"),
|
||||
IsDraft: c.Query("isDraft"),
|
||||
IsBanner: c.Query("isBanner"),
|
||||
Title: c.Query("title"),
|
||||
Description: c.Query("description"),
|
||||
Tags: c.Query("tags"),
|
||||
Category: c.Query("category"),
|
||||
CategoryId: c.Query("categoryId"),
|
||||
TypeId: c.Query("typeId"),
|
||||
StatusId: c.Query("statusId"),
|
||||
IsPublish: c.Query("isPublish"),
|
||||
IsDraft: c.Query("isDraft"),
|
||||
IsBanner: c.Query("isBanner"),
|
||||
CustomCreatorName: c.Query("customCreatorName"),
|
||||
Source: c.Query("source"),
|
||||
StartDate: c.Query("startDate"),
|
||||
EndDate: c.Query("endDate"),
|
||||
}
|
||||
req := reqContext.ToParamRequest()
|
||||
req.Pagination = paginate
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package mapper
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/rs/zerolog"
|
||||
"web-medols-be/app/database/entity"
|
||||
articleCategoriesMapper "web-medols-be/app/module/article_categories/mapper"
|
||||
articleCategoriesRepository "web-medols-be/app/module/article_categories/repository"
|
||||
|
|
@ -13,6 +11,9 @@ import (
|
|||
articleFilesResponse "web-medols-be/app/module/article_files/response"
|
||||
res "web-medols-be/app/module/articles/response"
|
||||
usersRepository "web-medols-be/app/module/users/repository"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/rs/zerolog"
|
||||
)
|
||||
|
||||
func ArticlesResponseMapper(
|
||||
|
|
@ -76,6 +77,8 @@ func ArticlesResponseMapper(
|
|||
IsPublish: articlesReq.IsPublish,
|
||||
PublishedAt: articlesReq.PublishedAt,
|
||||
IsActive: articlesReq.IsActive,
|
||||
Source: articlesReq.Source,
|
||||
CustomCreatorName: articlesReq.CustomCreatorName,
|
||||
CreatedAt: articlesReq.CreatedAt,
|
||||
UpdatedAt: articlesReq.UpdatedAt,
|
||||
ArticleFiles: articleFilesArr,
|
||||
|
|
|
|||
|
|
@ -140,6 +140,21 @@ func (_i *articlesRepository) GetAll(clientId *uuid.UUID, userLevelId *uint, req
|
|||
if req.CreatedById != nil {
|
||||
query = query.Where("articles.created_by_id = ?", req.CreatedById)
|
||||
}
|
||||
if req.Source != nil && *req.Source != "" {
|
||||
source := strings.ToLower(*req.Source)
|
||||
query = query.Where("LOWER(articles.source) = ?", strings.ToLower(source))
|
||||
}
|
||||
if req.CustomCreatorName != nil && *req.CustomCreatorName != "" {
|
||||
customCreatorName := strings.ToLower(*req.CustomCreatorName)
|
||||
query = query.Where("LOWER(articles.custom_creator_name) LIKE ?", "%"+strings.ToLower(customCreatorName)+"%")
|
||||
}
|
||||
if req.StartDate != nil {
|
||||
query = query.Where("DATE(articles.created_at) >= ?", req.StartDate.Format("2006-01-02"))
|
||||
}
|
||||
if req.EndDate != nil {
|
||||
query = query.Where("DATE(articles.created_at) <= ?", req.EndDate.Format("2006-01-02"))
|
||||
}
|
||||
|
||||
// Count total records
|
||||
query.Count(&count)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,112 +13,130 @@ type ArticlesGeneric interface {
|
|||
}
|
||||
|
||||
type ArticlesQueryRequest struct {
|
||||
Title *string `json:"title"`
|
||||
Description *string `json:"description"`
|
||||
CategoryId *uint `json:"categoryId"`
|
||||
Category *string `json:"category"`
|
||||
TypeId *int `json:"typeId"`
|
||||
Tags *string `json:"tags"`
|
||||
CreatedById *int `json:"createdById"`
|
||||
StatusId *int `json:"statusId"`
|
||||
IsBanner *bool `json:"isBanner"`
|
||||
IsPublish *bool `json:"isPublish"`
|
||||
IsDraft *bool `json:"isDraft"`
|
||||
Pagination *paginator.Pagination `json:"pagination"`
|
||||
Title *string `json:"title"`
|
||||
Description *string `json:"description"`
|
||||
CategoryId *uint `json:"categoryId"`
|
||||
Category *string `json:"category"`
|
||||
TypeId *int `json:"typeId"`
|
||||
Tags *string `json:"tags"`
|
||||
CreatedById *int `json:"createdById"`
|
||||
StatusId *int `json:"statusId"`
|
||||
IsBanner *bool `json:"isBanner"`
|
||||
IsPublish *bool `json:"isPublish"`
|
||||
IsDraft *bool `json:"isDraft"`
|
||||
Source *string `json:"source"`
|
||||
CustomCreatorName *string `json:"customCreatorName"`
|
||||
StartDate *time.Time `json:"startDate"`
|
||||
EndDate *time.Time `json:"endDate"`
|
||||
Pagination *paginator.Pagination `json:"pagination"`
|
||||
}
|
||||
|
||||
type ArticlesCreateRequest struct {
|
||||
Title string `json:"title" validate:"required"`
|
||||
Slug string `json:"slug" validate:"required"`
|
||||
Description string `json:"description" validate:"required"`
|
||||
HtmlDescription string `json:"htmlDescription" validate:"required"`
|
||||
CategoryIds string `json:"categoryIds" validate:"required"`
|
||||
TypeId int `json:"typeId" validate:"required"`
|
||||
Tags string `json:"tags" validate:"required"`
|
||||
AiArticleId *int `json:"aiArticleId"`
|
||||
CreatedAt *string `json:"createdAt"`
|
||||
CreatedById *uint `json:"createdById"`
|
||||
IsPublish *bool `json:"isPublish"`
|
||||
IsDraft *bool `json:"isDraft"`
|
||||
OldId *uint `json:"oldId"`
|
||||
Title string `json:"title" validate:"required"`
|
||||
Slug string `json:"slug" validate:"required"`
|
||||
Description string `json:"description" validate:"required"`
|
||||
HtmlDescription string `json:"htmlDescription" validate:"required"`
|
||||
CategoryIds string `json:"categoryIds" validate:"required"`
|
||||
TypeId int `json:"typeId" validate:"required"`
|
||||
Tags string `json:"tags" validate:"required"`
|
||||
AiArticleId *int `json:"aiArticleId"`
|
||||
CreatedAt *string `json:"createdAt"`
|
||||
CreatedById *uint `json:"createdById"`
|
||||
IsPublish *bool `json:"isPublish"`
|
||||
IsDraft *bool `json:"isDraft"`
|
||||
OldId *uint `json:"oldId"`
|
||||
Source *string `json:"source"`
|
||||
CustomCreatorName *string `json:"customCreatorName"`
|
||||
}
|
||||
|
||||
func (req ArticlesCreateRequest) ToEntity() *entity.Articles {
|
||||
return &entity.Articles{
|
||||
Title: req.Title,
|
||||
Slug: req.Slug,
|
||||
Description: req.Description,
|
||||
HtmlDescription: req.HtmlDescription,
|
||||
TypeId: req.TypeId,
|
||||
Tags: req.Tags,
|
||||
AiArticleId: req.AiArticleId,
|
||||
IsPublish: req.IsPublish,
|
||||
IsDraft: req.IsDraft,
|
||||
OldId: req.OldId,
|
||||
Title: req.Title,
|
||||
Slug: req.Slug,
|
||||
Description: req.Description,
|
||||
HtmlDescription: req.HtmlDescription,
|
||||
TypeId: req.TypeId,
|
||||
Tags: req.Tags,
|
||||
AiArticleId: req.AiArticleId,
|
||||
IsPublish: req.IsPublish,
|
||||
IsDraft: req.IsDraft,
|
||||
OldId: req.OldId,
|
||||
Source: req.Source,
|
||||
CustomCreatorName: req.CustomCreatorName,
|
||||
}
|
||||
}
|
||||
|
||||
type ArticlesUpdateRequest struct {
|
||||
Title string `json:"title" validate:"required"`
|
||||
Slug string `json:"slug" validate:"required"`
|
||||
Description string `json:"description" validate:"required"`
|
||||
HtmlDescription string `json:"htmlDescription" validate:"required"`
|
||||
CategoryIds string `json:"categoryIds" validate:"required"`
|
||||
TypeId int `json:"typeId" validate:"required"`
|
||||
Tags string `json:"tags" validate:"required"`
|
||||
CreatedAt *string `json:"createdAt"`
|
||||
CreatedById *uint `json:"createdById"`
|
||||
AiArticleId *int `json:"aiArticleId"`
|
||||
IsPublish *bool `json:"isPublish"`
|
||||
IsDraft *bool `json:"isDraft"`
|
||||
StatusId *int `json:"statusId"`
|
||||
Title string `json:"title" validate:"required"`
|
||||
Slug string `json:"slug" validate:"required"`
|
||||
Description string `json:"description" validate:"required"`
|
||||
HtmlDescription string `json:"htmlDescription" validate:"required"`
|
||||
CategoryIds string `json:"categoryIds" validate:"required"`
|
||||
TypeId int `json:"typeId" validate:"required"`
|
||||
Tags string `json:"tags" validate:"required"`
|
||||
CreatedAt *string `json:"createdAt"`
|
||||
CreatedById *uint `json:"createdById"`
|
||||
AiArticleId *int `json:"aiArticleId"`
|
||||
IsPublish *bool `json:"isPublish"`
|
||||
IsDraft *bool `json:"isDraft"`
|
||||
StatusId *int `json:"statusId"`
|
||||
Source *string `json:"source"`
|
||||
CustomCreatorName *string `json:"customCreatorName"`
|
||||
}
|
||||
|
||||
func (req ArticlesUpdateRequest) ToEntity() *entity.Articles {
|
||||
if req.CreatedById == nil {
|
||||
return &entity.Articles{
|
||||
Title: req.Title,
|
||||
Slug: req.Slug,
|
||||
Description: req.Description,
|
||||
HtmlDescription: req.HtmlDescription,
|
||||
TypeId: req.TypeId,
|
||||
Tags: req.Tags,
|
||||
StatusId: req.StatusId,
|
||||
AiArticleId: req.AiArticleId,
|
||||
IsPublish: req.IsPublish,
|
||||
IsDraft: req.IsDraft,
|
||||
UpdatedAt: time.Now(),
|
||||
Title: req.Title,
|
||||
Slug: req.Slug,
|
||||
Description: req.Description,
|
||||
HtmlDescription: req.HtmlDescription,
|
||||
TypeId: req.TypeId,
|
||||
Tags: req.Tags,
|
||||
StatusId: req.StatusId,
|
||||
AiArticleId: req.AiArticleId,
|
||||
IsPublish: req.IsPublish,
|
||||
IsDraft: req.IsDraft,
|
||||
Source: req.Source,
|
||||
CustomCreatorName: req.CustomCreatorName,
|
||||
UpdatedAt: time.Now(),
|
||||
}
|
||||
} else {
|
||||
return &entity.Articles{
|
||||
Title: req.Title,
|
||||
Slug: req.Slug,
|
||||
Description: req.Description,
|
||||
HtmlDescription: req.HtmlDescription,
|
||||
TypeId: req.TypeId,
|
||||
Tags: req.Tags,
|
||||
StatusId: req.StatusId,
|
||||
CreatedById: req.CreatedById,
|
||||
AiArticleId: req.AiArticleId,
|
||||
IsPublish: req.IsPublish,
|
||||
IsDraft: req.IsDraft,
|
||||
UpdatedAt: time.Now(),
|
||||
Title: req.Title,
|
||||
Slug: req.Slug,
|
||||
Description: req.Description,
|
||||
HtmlDescription: req.HtmlDescription,
|
||||
TypeId: req.TypeId,
|
||||
Tags: req.Tags,
|
||||
StatusId: req.StatusId,
|
||||
CreatedById: req.CreatedById,
|
||||
AiArticleId: req.AiArticleId,
|
||||
IsPublish: req.IsPublish,
|
||||
IsDraft: req.IsDraft,
|
||||
Source: req.Source,
|
||||
CustomCreatorName: req.CustomCreatorName,
|
||||
UpdatedAt: time.Now(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type ArticlesQueryRequestContext struct {
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
CategoryId string `json:"categoryId"`
|
||||
Category string `json:"category"`
|
||||
TypeId string `json:"typeId"`
|
||||
Tags string `json:"tags"`
|
||||
CreatedById string `json:"createdById"`
|
||||
IsBanner string `json:"isBanner"`
|
||||
IsPublish string `json:"isPublish"`
|
||||
IsDraft string `json:"isDraft"`
|
||||
StatusId string `json:"statusId"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
CategoryId string `json:"categoryId"`
|
||||
Category string `json:"category"`
|
||||
TypeId string `json:"typeId"`
|
||||
Tags string `json:"tags"`
|
||||
CreatedById string `json:"createdById"`
|
||||
IsBanner string `json:"isBanner"`
|
||||
IsPublish string `json:"isPublish"`
|
||||
IsDraft string `json:"isDraft"`
|
||||
StatusId string `json:"statusId"`
|
||||
Source string `json:"source"`
|
||||
CustomCreatorName string `json:"customCreatorName"`
|
||||
StartDate string `json:"startDate"`
|
||||
EndDate string `json:"endDate"`
|
||||
}
|
||||
|
||||
func (req ArticlesQueryRequestContext) ToParamRequest() ArticlesQueryRequest {
|
||||
|
|
@ -179,13 +197,29 @@ func (req ArticlesQueryRequestContext) ToParamRequest() ArticlesQueryRequest {
|
|||
request.CreatedById = &createdById
|
||||
}
|
||||
}
|
||||
if source := req.Source; source != "" {
|
||||
request.Source = &source
|
||||
}
|
||||
if customCreatorName := req.CustomCreatorName; customCreatorName != "" {
|
||||
request.CustomCreatorName = &customCreatorName
|
||||
}
|
||||
if startDateStr := req.StartDate; startDateStr != "" {
|
||||
if startDate, err := time.Parse("2006-01-02", startDateStr); err == nil {
|
||||
request.StartDate = &startDate
|
||||
}
|
||||
}
|
||||
if endDateStr := req.EndDate; endDateStr != "" {
|
||||
if endDate, err := time.Parse("2006-01-02", endDateStr); err == nil {
|
||||
request.EndDate = &endDate
|
||||
}
|
||||
}
|
||||
|
||||
return request
|
||||
}
|
||||
|
||||
// SubmitForApprovalRequest represents the request for submitting an article for approval
|
||||
type SubmitForApprovalRequest struct {
|
||||
WorkflowId *uint `json:"workflow_id" validate:"omitempty,min=1"`
|
||||
WorkflowId *uint `json:"workflow_id" validate:"omitempty,min=1"`
|
||||
Message *string `json:"message" validate:"omitempty,max=500"`
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,31 +7,33 @@ import (
|
|||
)
|
||||
|
||||
type ArticlesResponse struct {
|
||||
ID uint `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Slug string `json:"slug"`
|
||||
Description string `json:"description"`
|
||||
HtmlDescription string `json:"htmlDescription"`
|
||||
CategoryId int `json:"categoryId"`
|
||||
CategoryName string `json:"categoryName"`
|
||||
TypeId int `json:"typeId"`
|
||||
Tags string `json:"tags"`
|
||||
ThumbnailUrl string `json:"thumbnailUrl"`
|
||||
PageUrl *string `json:"pageUrl"`
|
||||
CreatedById *uint `json:"createdById"`
|
||||
CreatedByName *string `json:"createdByName"`
|
||||
ShareCount *int `json:"shareCount"`
|
||||
ViewCount *int `json:"viewCount"`
|
||||
CommentCount *int `json:"commentCount"`
|
||||
AiArticleId *int `json:"aiArticleId"`
|
||||
OldId *uint `json:"oldId"`
|
||||
StatusId *int `json:"statusId"`
|
||||
IsBanner *bool `json:"isBanner"`
|
||||
IsPublish *bool `json:"isPublish"`
|
||||
PublishedAt *time.Time `json:"publishedAt"`
|
||||
IsActive *bool `json:"isActive"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
ID uint `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Slug string `json:"slug"`
|
||||
Description string `json:"description"`
|
||||
HtmlDescription string `json:"htmlDescription"`
|
||||
CategoryId int `json:"categoryId"`
|
||||
CategoryName string `json:"categoryName"`
|
||||
TypeId int `json:"typeId"`
|
||||
Tags string `json:"tags"`
|
||||
ThumbnailUrl string `json:"thumbnailUrl"`
|
||||
PageUrl *string `json:"pageUrl"`
|
||||
CreatedById *uint `json:"createdById"`
|
||||
CreatedByName *string `json:"createdByName"`
|
||||
ShareCount *int `json:"shareCount"`
|
||||
ViewCount *int `json:"viewCount"`
|
||||
CommentCount *int `json:"commentCount"`
|
||||
AiArticleId *int `json:"aiArticleId"`
|
||||
OldId *uint `json:"oldId"`
|
||||
StatusId *int `json:"statusId"`
|
||||
IsBanner *bool `json:"isBanner"`
|
||||
IsPublish *bool `json:"isPublish"`
|
||||
PublishedAt *time.Time `json:"publishedAt"`
|
||||
IsActive *bool `json:"isActive"`
|
||||
Source *string `json:"source"`
|
||||
CustomCreatorName *string `json:"customCreatorName"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
|
||||
ArticleFiles []*articleFilesResponse.ArticleFilesResponse `json:"files"`
|
||||
ArticleCategories []*articleCategoriesResponse.ArticleCategoriesResponse `json:"categories"`
|
||||
|
|
|
|||
|
|
@ -6839,11 +6839,21 @@ const docTemplate = `{
|
|||
"name": "createdById",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "customCreatorName",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "description",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "endDate",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isBanner",
|
||||
|
|
@ -6859,6 +6869,16 @@ const docTemplate = `{
|
|||
"name": "isPublish",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "source",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "startDate",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "statusId",
|
||||
|
|
@ -16591,6 +16611,9 @@ const docTemplate = `{
|
|||
"createdById": {
|
||||
"type": "integer"
|
||||
},
|
||||
"customCreatorName": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -16609,6 +16632,9 @@ const docTemplate = `{
|
|||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -16644,6 +16670,9 @@ const docTemplate = `{
|
|||
"createdById": {
|
||||
"type": "integer"
|
||||
},
|
||||
"customCreatorName": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -16659,6 +16688,9 @@ const docTemplate = `{
|
|||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"statusId": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -6828,11 +6828,21 @@
|
|||
"name": "createdById",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "customCreatorName",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "description",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "endDate",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "isBanner",
|
||||
|
|
@ -6848,6 +6858,16 @@
|
|||
"name": "isPublish",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "source",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "startDate",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"name": "statusId",
|
||||
|
|
@ -16580,6 +16600,9 @@
|
|||
"createdById": {
|
||||
"type": "integer"
|
||||
},
|
||||
"customCreatorName": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -16598,6 +16621,9 @@
|
|||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"tags": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -16633,6 +16659,9 @@
|
|||
"createdById": {
|
||||
"type": "integer"
|
||||
},
|
||||
"customCreatorName": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -16648,6 +16677,9 @@
|
|||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"statusId": {
|
||||
"type": "integer"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -465,6 +465,8 @@ definitions:
|
|||
type: string
|
||||
createdById:
|
||||
type: integer
|
||||
customCreatorName:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
htmlDescription:
|
||||
|
|
@ -477,6 +479,8 @@ definitions:
|
|||
type: integer
|
||||
slug:
|
||||
type: string
|
||||
source:
|
||||
type: string
|
||||
tags:
|
||||
type: string
|
||||
title:
|
||||
|
|
@ -502,6 +506,8 @@ definitions:
|
|||
type: string
|
||||
createdById:
|
||||
type: integer
|
||||
customCreatorName:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
htmlDescription:
|
||||
|
|
@ -512,6 +518,8 @@ definitions:
|
|||
type: boolean
|
||||
slug:
|
||||
type: string
|
||||
source:
|
||||
type: string
|
||||
statusId:
|
||||
type: integer
|
||||
tags:
|
||||
|
|
@ -5814,9 +5822,15 @@ paths:
|
|||
- in: query
|
||||
name: createdById
|
||||
type: integer
|
||||
- in: query
|
||||
name: customCreatorName
|
||||
type: string
|
||||
- in: query
|
||||
name: description
|
||||
type: string
|
||||
- in: query
|
||||
name: endDate
|
||||
type: string
|
||||
- in: query
|
||||
name: isBanner
|
||||
type: boolean
|
||||
|
|
@ -5826,6 +5840,12 @@ paths:
|
|||
- in: query
|
||||
name: isPublish
|
||||
type: boolean
|
||||
- in: query
|
||||
name: source
|
||||
type: string
|
||||
- in: query
|
||||
name: startDate
|
||||
type: string
|
||||
- in: query
|
||||
name: statusId
|
||||
type: integer
|
||||
|
|
|
|||
Loading…
Reference in New Issue