41 lines
1.0 KiB
Go
41 lines
1.0 KiB
Go
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"`
|
|
}
|
|
|
|
type PostBody struct {
|
|
Title string
|
|
Description string
|
|
Content string
|
|
Price int64
|
|
Discount int16
|
|
}
|