fix: add parameters publishedFor in articles
This commit is contained in:
parent
575c271d27
commit
f43d96c621
|
|
@ -15,6 +15,7 @@ type Articles struct {
|
|||
HtmlDescription string `json:"html_description" gorm:"type:varchar"`
|
||||
TypeId int `json:"type_id" gorm:"type:int4"`
|
||||
Tags string `json:"tags" gorm:"type:varchar"`
|
||||
PublishedFor *string `json:"published_for" gorm:"type:varchar(100)"`
|
||||
ThumbnailName *string `json:"thumbnail_name" gorm:"type:varchar"`
|
||||
ThumbnailPath *string `json:"thumbnail_path" gorm:"type:varchar"`
|
||||
PageUrl *string `json:"page_url" gorm:"type:varchar"`
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ type ArticlesCreateRequest struct {
|
|||
IsPublish *bool `json:"isPublish"`
|
||||
IsDraft *bool `json:"isDraft"`
|
||||
OldId *uint `json:"oldId"`
|
||||
PublishedFor *string `json:"publishedFor"`
|
||||
}
|
||||
|
||||
func (req ArticlesCreateRequest) ToEntity() *entity.Articles {
|
||||
|
|
@ -56,6 +57,7 @@ func (req ArticlesCreateRequest) ToEntity() *entity.Articles {
|
|||
IsPublish: req.IsPublish,
|
||||
IsDraft: req.IsDraft,
|
||||
OldId: req.OldId,
|
||||
PublishedFor: req.PublishedFor,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -73,6 +75,7 @@ type ArticlesUpdateRequest struct {
|
|||
IsPublish *bool `json:"isPublish"`
|
||||
IsDraft *bool `json:"isDraft"`
|
||||
StatusId *int `json:"statusId"`
|
||||
PublishedFor *string `json:"publishedFor"`
|
||||
}
|
||||
|
||||
func (req ArticlesUpdateRequest) ToEntity() *entity.Articles {
|
||||
|
|
@ -89,6 +92,7 @@ func (req ArticlesUpdateRequest) ToEntity() *entity.Articles {
|
|||
IsPublish: req.IsPublish,
|
||||
IsDraft: req.IsDraft,
|
||||
UpdatedAt: time.Now(),
|
||||
PublishedFor: req.PublishedFor,
|
||||
}
|
||||
} else {
|
||||
return &entity.Articles{
|
||||
|
|
|
|||
|
|
@ -20189,6 +20189,9 @@ const docTemplate = `{
|
|||
"oldId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"publishedFor": {
|
||||
"type": "string"
|
||||
},
|
||||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -20239,6 +20242,9 @@ const docTemplate = `{
|
|||
"isPublish": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"publishedFor": {
|
||||
"type": "string"
|
||||
},
|
||||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20178,6 +20178,9 @@
|
|||
"oldId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"publishedFor": {
|
||||
"type": "string"
|
||||
},
|
||||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
@ -20228,6 +20231,9 @@
|
|||
"isPublish": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"publishedFor": {
|
||||
"type": "string"
|
||||
},
|
||||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -554,6 +554,8 @@ definitions:
|
|||
type: boolean
|
||||
oldId:
|
||||
type: integer
|
||||
publishedFor:
|
||||
type: string
|
||||
slug:
|
||||
type: string
|
||||
tags:
|
||||
|
|
@ -589,6 +591,8 @@ definitions:
|
|||
type: boolean
|
||||
isPublish:
|
||||
type: boolean
|
||||
publishedFor:
|
||||
type: string
|
||||
slug:
|
||||
type: string
|
||||
statusId:
|
||||
|
|
|
|||
Loading…
Reference in New Issue