package model

// RegisterRequest 注册请求
type RegisterRequest struct {
	Email           string `json:"email" binding:"required,email"`
	Password        string `json:"password" binding:"required,min=8"`
	ConfirmPassword string `json:"confirm_password" binding:"required,eqfield=Password"`
	RememberMe      bool   `json:"remember_me"`
}

// LoginRequest 登录请求
type LoginRequest struct {
	Email      string `json:"email" binding:"required,email"`
	Password   string `json:"password" binding:"required"`
	RememberMe bool   `json:"remember_me"`
}

// CheckEmailRequest 检查邮箱是否已注册
type CheckEmailRequest struct {
	Email string `json:"email" binding:"required,email"`
}

// ---- Post DTOs ----

// PostListResult 帖子列表查询结果
type PostListResult struct {
	Items      []Post `json:"items"`
	Total      int64  `json:"total"`
	Page       int    `json:"page"`
	TotalPages int    `json:"total_pages"`
}

// PostCreateRequest 发帖请求
type PostCreateRequest struct {
	Title string `json:"title" binding:"required,min=1,max=200"`
	Body  string `json:"body" binding:"required,min=1"`
}

// PostUpdateRequest 编辑请求
type PostUpdateRequest struct {
	Title string `json:"title" binding:"required,min=1,max=200"`
	Body  string `json:"body" binding:"required,min=1"`
}

// PostRejectRequest 退回请求
type PostRejectRequest struct {
	Reason string `json:"reason" binding:"required,min=1,max=500"`
}

// PostListQuery 列表查询参数
type PostListQuery struct {
	Keyword  string `form:"keyword"`
	Status   string `form:"status"`
	Page     int    `form:"page"`
	PageSize int    `form:"page_size"`
}