feat: add posts

This commit is contained in:
Rogee
2025-01-10 19:22:39 +08:00
parent f3ae895fec
commit ab576706e7
10 changed files with 558 additions and 3 deletions

View 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"`
}