feat: update articles old id
This commit is contained in:
parent
cf1003267c
commit
74e55bc19d
|
|
@ -19,6 +19,7 @@ type Articles struct {
|
|||
ViewCount *int `json:"view_count" gorm:"type:int4"`
|
||||
DownloadCount *int `json:"download_count" gorm:"type:int4"`
|
||||
StatusId *int `json:"status_id" gorm:"type:int4"`
|
||||
OldId *uint `json:"old_id" gorm:"type:int4"`
|
||||
IsPublish *bool `json:"is_publish" gorm:"type:bool;default:false"`
|
||||
PublishedAt *time.Time `json:"published_at" gorm:"type:timestamp"`
|
||||
IsActive *bool `json:"is_active" gorm:"type:bool;default:true"`
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ type ArticlesCreateRequest struct {
|
|||
CategoryId int `json:"categoryId" validate:"required"`
|
||||
TypeId int `json:"typeId" validate:"required"`
|
||||
Tags string `json:"tags" validate:"required"`
|
||||
OldId *uint `json:"oldId"`
|
||||
}
|
||||
|
||||
func (req ArticlesCreateRequest) ToEntity() *entity.Articles {
|
||||
|
|
@ -42,6 +43,7 @@ func (req ArticlesCreateRequest) ToEntity() *entity.Articles {
|
|||
TypeId: req.TypeId,
|
||||
Tags: req.Tags,
|
||||
CategoryId: req.CategoryId,
|
||||
OldId: req.OldId,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5373,6 +5373,9 @@ const docTemplate = `{
|
|||
"htmlDescription": {
|
||||
"type": "string"
|
||||
},
|
||||
"oldId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5362,6 +5362,9 @@
|
|||
"htmlDescription": {
|
||||
"type": "string"
|
||||
},
|
||||
"oldId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -98,6 +98,8 @@ definitions:
|
|||
type: string
|
||||
htmlDescription:
|
||||
type: string
|
||||
oldId:
|
||||
type: integer
|
||||
slug:
|
||||
type: string
|
||||
tags:
|
||||
|
|
|
|||
Loading…
Reference in New Issue