QuizPaper created_at

This commit is contained in:
JongYeob Sheen 2024-01-07 18:47:50 +09:00
parent c31a16843d
commit d9ecd65d75
4 changed files with 32 additions and 9 deletions

View File

@ -1376,6 +1376,10 @@ const docTemplate = `{
"type": "string", "type": "string",
"example": "퀴즈 시트 설명" "example": "퀴즈 시트 설명"
}, },
"created_at": {
"type": "string",
"example": "2023-11-10T13:10:00+09:00"
},
"guid_id": { "guid_id": {
"type": "string", "type": "string",
"example": "ef74c59a-c707-4162-a52b-455906c81ec1" "example": "ef74c59a-c707-4162-a52b-455906c81ec1"
@ -1510,6 +1514,10 @@ const docTemplate = `{
"type": "string", "type": "string",
"example": "퀴즈 시트 설명" "example": "퀴즈 시트 설명"
}, },
"created_at": {
"type": "string",
"example": "2023-11-10T13:10:00+09:00"
},
"id": { "id": {
"type": "integer", "type": "integer",
"example": 100001 "example": 100001

View File

@ -1368,6 +1368,10 @@
"type": "string", "type": "string",
"example": "퀴즈 시트 설명" "example": "퀴즈 시트 설명"
}, },
"created_at": {
"type": "string",
"example": "2023-11-10T13:10:00+09:00"
},
"guid_id": { "guid_id": {
"type": "string", "type": "string",
"example": "ef74c59a-c707-4162-a52b-455906c81ec1" "example": "ef74c59a-c707-4162-a52b-455906c81ec1"
@ -1502,6 +1506,10 @@
"type": "string", "type": "string",
"example": "퀴즈 시트 설명" "example": "퀴즈 시트 설명"
}, },
"created_at": {
"type": "string",
"example": "2023-11-10T13:10:00+09:00"
},
"id": { "id": {
"type": "integer", "type": "integer",
"example": 100001 "example": 100001

View File

@ -172,6 +172,9 @@ definitions:
content: content:
example: 퀴즈 시트 설명 example: 퀴즈 시트 설명
type: string type: string
created_at:
example: "2023-11-10T13:10:00+09:00"
type: string
guid_id: guid_id:
example: ef74c59a-c707-4162-a52b-455906c81ec1 example: ef74c59a-c707-4162-a52b-455906c81ec1
type: string type: string
@ -267,6 +270,9 @@ definitions:
content: content:
example: 퀴즈 시트 설명 example: 퀴즈 시트 설명
type: string type: string
created_at:
example: "2023-11-10T13:10:00+09:00"
type: string
id: id:
example: 100001 example: 100001
type: integer type: integer

View File

@ -17,7 +17,7 @@ type QuizPaper struct {
Tag datatypes.JSON `json:"tag" db:"tag" gorm:"column:tag;"` Tag datatypes.JSON `json:"tag" db:"tag" gorm:"column:tag;"`
Status string `json:"status" example:"on" gorm:"column:status;size:10;index;"` Status string `json:"status" example:"on" gorm:"column:status;size:10;index;"`
UpdatedAt time.Time `json:"-" gorm:"column:updated_at;type:DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;index;->:false"` UpdatedAt time.Time `json:"-" gorm:"column:updated_at;type:DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;index;->:false"`
CreatedAt time.Time `json:"-" gorm:"column:created_at;type:DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP;index;->:false;<-:create"` CreatedAt time.Time `json:"created_at" db:"created_at" example:"2023-11-10T13:10:00+09:00" gorm:"column:created_at;type:DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP;index;"`
} }
// 테이블이름 정의 // 테이블이름 정의
@ -35,14 +35,15 @@ type QuizPaperRequest struct {
} }
type QuizPaperResponse struct { type QuizPaperResponse struct {
ID int64 `json:"id" example:"100001"` ID int64 `json:"id" example:"100001"`
CenterID int64 `json:"center_id" example:"100001"` CenterID int64 `json:"center_id" example:"100001"`
ManagerID int64 `json:"manager_id" example:"100001"` ManagerID int64 `json:"manager_id" example:"100001"`
Title string `json:"title" example:"퀴즈 시트 제목"` Title string `json:"title" example:"퀴즈 시트 제목"`
Content string `json:"content" example:"퀴즈 시트 설명"` Content string `json:"content" example:"퀴즈 시트 설명"`
Category string `json:"category" example:"파이썬기본"` Category string `json:"category" example:"파이썬기본"`
Tag []string `json:"tag" example:"Python,AI,Robot,파이썬"` Tag []string `json:"tag" example:"Python,AI,Robot,파이썬"`
Status string `json:"status" example:"on"` Status string `json:"status" example:"on"`
CreatedAt time.Time `json:"created_at" example:"2023-11-10T13:10:00+09:00"`
} }
type QuizPaperListResponse struct { type QuizPaperListResponse struct {