package example

import "time"

// AttachmentCategoryInfo 附件分类信息
type AttachmentCategoryInfo struct {
	ID        uint                     `json:"ID"`
	Name      string                   `json:"name"`
	CreatedAt time.Time                `json:"createdAt"`
	Children  []AttachmentCategoryInfo `json:"children,omitempty"`
}

// CreateAttachmentCategoryRequest 创建附件分类请求
type CreateAttachmentCategoryRequest struct {
	Name     string `json:"name" binding:"required"`
	ParentID *uint  `json:"parentId"`
}

// UpdateAttachmentCategoryRequest 更新附件分类请求
type UpdateAttachmentCategoryRequest struct {
	ID       uint   `json:"ID" binding:"required"`
	Name     string `json:"name"`
	ParentID *uint  `json:"parentId"`
}

// GetAttachmentCategoryListRequest 获取附件分类列表请求
type GetAttachmentCategoryListRequest struct {
	Page     int `json:"page" form:"page"`
	PageSize int `json:"pageSize" form:"pageSize"`
	ClassId  int `json:"classId" form:"classId"`
}

// GetAttachmentCategoryListReply 获取附件分类列表响应
type GetAttachmentCategoryListReply struct {
	List     []AttachmentCategoryInfo `json:"list"`
	Total    int64                    `json:"total"`
	Page     int                      `json:"page"`
	PageSize int                      `json:"pageSize"`
}

// AttachmentCategoryResponse 附件分类响应
type AttachmentCategoryResponse struct {
	Category AttachmentCategoryInfo `json:"category"`
}
