Implement public FAQ read endpoints and admin CRUD with RBAC, persistence, and migrations, then regenerate Swagger and add a complete Postman collection so frontend/admin teams can integrate and validate the feature end-to-end. Co-authored-by: Cursor <cursoragent@cursor.com>
36 lines
767 B
Go
36 lines
767 B
Go
package domain
|
|
|
|
import "time"
|
|
|
|
const (
|
|
FAQStatusActive = "ACTIVE"
|
|
FAQStatusInactive = "INACTIVE"
|
|
)
|
|
|
|
type FAQ struct {
|
|
ID int64 `json:"id"`
|
|
Question string `json:"question"`
|
|
Answer string `json:"answer"`
|
|
Category *string `json:"category,omitempty"`
|
|
DisplayOrder int32 `json:"display_order"`
|
|
Status string `json:"status"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt *time.Time `json:"updated_at,omitempty"`
|
|
}
|
|
|
|
type CreateFAQInput struct {
|
|
Question string
|
|
Answer string
|
|
Category *string
|
|
DisplayOrder *int32
|
|
Status *string
|
|
}
|
|
|
|
type UpdateFAQInput struct {
|
|
Question *string
|
|
Answer *string
|
|
Category *string
|
|
DisplayOrder *int32
|
|
Status *string
|
|
}
|