feat: add posts
This commit is contained in:
32
backend/app/http/posts/dto.go
Normal file
32
backend/app/http/posts/dto.go
Normal file
@@ -0,0 +1,32 @@
|
||||
package posts
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type UserPost struct {
|
||||
ID int64 `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
HashID string `json:"hash_id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
Poster string `json:"poster"`
|
||||
Content string `json:"content"`
|
||||
Stage int16 `json:"stage"`
|
||||
Status int16 `json:"status"`
|
||||
Price int64 `json:"price"`
|
||||
Discount int16 `json:"discount"`
|
||||
Views int64 `json:"views"`
|
||||
Likes int64 `json:"likes"`
|
||||
Meta *string `json:"meta"`
|
||||
Assets *string `json:"assets"`
|
||||
}
|
||||
|
||||
type UserPostFilter struct {
|
||||
ID *int64 `json:"id"`
|
||||
TenantID int64 `query:"tenant_id"`
|
||||
UserID int64 `query:"user_id"`
|
||||
CreatedAt *time.Time `query:"created_at"`
|
||||
Keyword *string `json:"title"`
|
||||
}
|
||||
Reference in New Issue
Block a user