Added migrations

This commit is contained in:
KamilM1205 2025-09-20 18:16:26 +04:00
parent 4a16acc87e
commit 5b18009658
34 changed files with 929 additions and 154 deletions

View file

@ -0,0 +1,13 @@
package responses
type ErrorResponse struct {
ErrorCode int `json:"error_code"`
Message string `json:"message"`
}
func CreateErrorResponse(code int, msg string) ErrorResponse {
return ErrorResponse{
ErrorCode: code,
Message: msg,
}
}

View file

@ -0,0 +1,9 @@
package responses
type GetListPostResponseItem struct {
Id string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
}
type GetListPostResponse []GetListPostResponseItem

View file

@ -0,0 +1,15 @@
package responses
import "time"
type PostResponse struct {
Id string `json:"id"`
UserId string `json:"userId"`
Title string `json:"title"`
Description string `json:"description"`
Content string `json:"content"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type PostResponseList []*PostResponse