dto

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchCreateReadyResourceRequest

type BatchCreateReadyResourceRequest struct {
	Resources []CreateReadyResourceRequest `json:"resources" binding:"required"`
}

BatchCreateReadyResourceRequest 批量创建待处理资源请求

type BatchReadyResourceRequest

type BatchReadyResourceRequest struct {
	Resources []ReadyResourceRequest `json:"resources" validate:"required"`
}

BatchReadyResourceRequest 批量待处理资源请求

type CategoryResponse

type CategoryResponse struct {
	ID            uint     `json:"id"`
	Name          string   `json:"name"`
	Description   string   `json:"description"`
	ResourceCount int64    `json:"resource_count"`
	TagNames      []string `json:"tag_names"`
}

CategoryResponse 分类响应

type ChangePasswordRequest

type ChangePasswordRequest struct {
	NewPassword string `json:"new_password" binding:"required,min=6"`
}

ChangePasswordRequest 修改密码请求

type CksResponse

type CksResponse struct {
	ID          uint         `json:"id"`
	PanID       uint         `json:"pan_id"`
	Idx         int          `json:"idx"`
	Ck          string       `json:"ck"`
	IsValid     bool         `json:"is_valid"`
	Space       int64        `json:"space"`
	LeftSpace   int64        `json:"left_space"`
	UsedSpace   int64        `json:"used_space"`
	Username    string       `json:"username"`
	VipStatus   bool         `json:"vip_status"`
	ServiceType string       `json:"service_type"`
	Remark      string       `json:"remark"`
	Pan         *PanResponse `json:"pan,omitempty"`
}

CksResponse Cookie响应

type CreateCategoryRequest

type CreateCategoryRequest struct {
	Name        string `json:"name" binding:"required"`
	Description string `json:"description"`
}

CreateCategoryRequest 创建分类请求

type CreateCksRequest

type CreateCksRequest struct {
	PanID       uint   `json:"pan_id" binding:"required"`
	Idx         int    `json:"idx"`
	Ck          string `json:"ck"`
	IsValid     bool   `json:"is_valid"`
	Space       int64  `json:"space"`
	LeftSpace   int64  `json:"left_space"`
	UsedSpace   int64  `json:"used_space"`
	Username    string `json:"username"`
	VipStatus   bool   `json:"vip_status"`
	ServiceType string `json:"service_type"`
	Remark      string `json:"remark"`
}

CreateCksRequest 创建cookie请求

type CreatePanRequest

type CreatePanRequest struct {
	Name   string `json:"name" binding:"required"`
	Key    int    `json:"key"`
	Icon   string `json:"icon"`
	Remark string `json:"remark"`
}

CreatePanRequest 创建平台请求

type CreateReadyResourceRequest

type CreateReadyResourceRequest struct {
	Title       *string `json:"title"`
	Description string  `json:"description"`
	URL         string  `json:"url" binding:"required"`
	Category    string  `json:"category"`
	Tags        string  `json:"tags"`
	Img         string  `json:"img"`
	Source      string  `json:"source"`
	Extra       string  `json:"extra"`
	IP          *string `json:"ip"`
}

CreateReadyResourceRequest 创建待处理资源请求

type CreateResourceRequest

type CreateResourceRequest struct {
	Title       string `json:"title" binding:"required"`
	Description string `json:"description"`
	URL         string `json:"url"`
	PanID       *uint  `json:"pan_id"`
	QuarkURL    string `json:"quark_url"`
	FileSize    string `json:"file_size"`
	CategoryID  *uint  `json:"category_id"`
	IsValid     bool   `json:"is_valid"`
	IsPublic    bool   `json:"is_public"`
	TagIDs      []uint `json:"tag_ids"`
}

CreateResourceRequest 创建资源请求

type CreateTagRequest

type CreateTagRequest struct {
	Name        string `json:"name" binding:"required"`
	Description string `json:"description"`
	CategoryID  *uint  `json:"category_id"`
}

CreateTagRequest 创建标签请求

type CreateUserRequest

type CreateUserRequest struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
	Email    string `json:"email" binding:"required,email"`
	Role     string `json:"role"`
	IsActive bool   `json:"is_active"`
}

CreateUserRequest 创建用户请求

type DailySearchStatResponse

type DailySearchStatResponse struct {
	Date           time.Time `json:"date"`
	TotalSearches  int       `json:"total_searches"`
	UniqueKeywords int       `json:"unique_keywords"`
}

DailySearchStatResponse 每日搜索统计响应

type HotDramaListResponse

type HotDramaListResponse struct {
	Total int                `json:"total"`
	Items []HotDramaResponse `json:"items"`
}

HotDramaListResponse 热播剧列表响应

type HotDramaRequest

type HotDramaRequest struct {
	Title        string  `json:"title" validate:"required"`
	CardSubtitle string  `json:"card_subtitle"`
	EpisodesInfo string  `json:"episodes_info"`
	IsNew        bool    `json:"is_new"`
	Rating       float64 `json:"rating"`
	RatingCount  int     `json:"rating_count"`
	Year         string  `json:"year"`
	Region       string  `json:"region"`
	Genres       string  `json:"genres"`
	Directors    string  `json:"directors"`
	Actors       string  `json:"actors"`
	PosterURL    string  `json:"poster_url"`
	Category     string  `json:"category"`
	SubType      string  `json:"sub_type"`
	Source       string  `json:"source"`
	DoubanID     string  `json:"douban_id"`
	DoubanURI    string  `json:"douban_uri"`
}

HotDramaRequest 热播剧请求

type HotDramaResponse

type HotDramaResponse struct {
	ID        uint   `json:"id"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`

	Title        string  `json:"title"`
	CardSubtitle string  `json:"card_subtitle"`
	EpisodesInfo string  `json:"episodes_info"`
	IsNew        bool    `json:"is_new"`
	Rating       float64 `json:"rating"`
	RatingCount  int     `json:"rating_count"`
	Year         string  `json:"year"`
	Region       string  `json:"region"`
	Genres       string  `json:"genres"`
	Directors    string  `json:"directors"`
	Actors       string  `json:"actors"`
	PosterURL    string  `json:"poster_url"`
	Category     string  `json:"category"`
	SubType      string  `json:"sub_type"`
	Source       string  `json:"source"`
	DoubanID     string  `json:"douban_id"`
	DoubanURI    string  `json:"douban_uri"`
}

HotDramaResponse 热播剧响应

type HotKeywordResponse

type HotKeywordResponse struct {
	Keyword string `json:"keyword"`
	Count   int    `json:"count"`
	Rank    int    `json:"rank"`
}

HotKeywordResponse 热门关键词响应

type LoginRequest

type LoginRequest struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
}

LoginRequest 登录请求

type LoginResponse

type LoginResponse struct {
	Token string       `json:"token"`
	User  UserResponse `json:"user"`
}

LoginResponse 登录响应

type PanResponse

type PanResponse struct {
	ID     uint   `json:"id"`
	Name   string `json:"name"`
	Key    int    `json:"key"`
	Icon   string `json:"icon"`
	Remark string `json:"remark"`
}

PanResponse 平台响应

type ReadyResourceRequest

type ReadyResourceRequest struct {
	Title       string `json:"title" validate:"required" example:"示例资源标题"`
	Description string `json:"description" example:"这是一个示例资源描述"`
	Url         string `json:"url" validate:"required" example:"https://example.com/resource"`
	Category    string `json:"category" example:"示例分类"`
	Tags        string `json:"tags" example:"标签1,标签2"`
	Img         string `json:"img" example:"https://example.com/image.jpg"`
	Source      string `json:"source" example:"数据来源"`
	Extra       string `json:"extra" example:"额外信息"`
}

ReadyResourceRequest 待处理资源请求

type ReadyResourceResponse

type ReadyResourceResponse struct {
	ID          uint      `json:"id"`
	Title       *string   `json:"title"`
	Description string    `json:"description"`
	URL         string    `json:"url"`
	Category    string    `json:"category"`
	Tags        string    `json:"tags"`
	Img         string    `json:"img"`
	Source      string    `json:"source"`
	Extra       string    `json:"extra"`
	CreateTime  time.Time `json:"create_time"`
	IP          *string   `json:"ip"`
}

ReadyResourceResponse 待处理资源响应

type RegisterRequest

type RegisterRequest struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password" binding:"required"`
	Email    string `json:"email" binding:"required,email"`
}

RegisterRequest 注册请求

type ResourceResponse

type ResourceResponse struct {
	ID           uint          `json:"id"`
	Title        string        `json:"title"`
	Description  string        `json:"description"`
	URL          string        `json:"url"`
	PanID        *uint         `json:"pan_id"`
	QuarkURL     string        `json:"quark_url"`
	FileSize     string        `json:"file_size"`
	CategoryID   *uint         `json:"category_id"`
	CategoryName string        `json:"category_name"`
	ViewCount    int           `json:"view_count"`
	IsValid      bool          `json:"is_valid"`
	IsPublic     bool          `json:"is_public"`
	CreatedAt    time.Time     `json:"created_at"`
	UpdatedAt    time.Time     `json:"updated_at"`
	Tags         []TagResponse `json:"tags"`
}

ResourceResponse 资源响应

type SearchRequest

type SearchRequest struct {
	Query      string `json:"query"`
	CategoryID *uint  `json:"category_id"`
	Page       int    `json:"page"`
	Limit      int    `json:"limit"`
}

SearchRequest 搜索请求

type SearchResponse

type SearchResponse struct {
	Resources []ResourceResponse `json:"resources"`
	Total     int64              `json:"total"`
	Page      int                `json:"page"`
	Limit     int                `json:"limit"`
}

SearchResponse 搜索响应

type SearchStatRequest

type SearchStatRequest struct {
	Keyword string `json:"keyword" binding:"required"`
}

SearchStatRequest 搜索统计请求

type SearchStatResponse

type SearchStatResponse struct {
	ID        uint      `json:"id"`
	Keyword   string    `json:"keyword"`
	Count     int       `json:"count"`
	Date      time.Time `json:"date"`
	CreatedAt time.Time `json:"created_at"`
}

SearchStatResponse 搜索统计响应

type SearchStatsResponse

type SearchStatsResponse struct {
	TodaySearches int                       `json:"today_searches"`
	WeekSearches  int                       `json:"week_searches"`
	MonthSearches int                       `json:"month_searches"`
	HotKeywords   []HotKeywordResponse      `json:"hot_keywords"`
	DailyStats    []DailySearchStatResponse `json:"daily_stats"`
	SearchTrend   SearchTrendResponse       `json:"search_trend"`
}

SearchStatsResponse 搜索统计总览响应

type SearchTrendResponse

type SearchTrendResponse struct {
	Days   []string `json:"days"`
	Values []int    `json:"values"`
}

SearchTrendResponse 搜索趋势响应

type Stats

type Stats struct {
	TotalResources  int64 `json:"total_resources"`
	TotalCategories int64 `json:"total_categories"`
	TotalTags       int64 `json:"total_tags"`
	TotalViews      int64 `json:"total_views"`
}

Stats 统计信息

type SystemConfigRequest

type SystemConfigRequest struct {
	// SEO 配置
	SiteTitle       string `json:"site_title" validate:"required"`
	SiteDescription string `json:"site_description"`
	Keywords        string `json:"keywords"`
	Author          string `json:"author"`
	Copyright       string `json:"copyright"`

	// 自动处理配置组
	AutoProcessReadyResources bool `json:"auto_process_ready_resources"`                        // 自动处理待处理资源
	AutoProcessInterval       int  `json:"auto_process_interval" validate:"min=1,max=1440"`     // 自动处理间隔(分钟)
	AutoTransferEnabled       bool `json:"auto_transfer_enabled"`                               // 开启自动转存
	AutoTransferLimitDays     int  `json:"auto_transfer_limit_days" validate:"min=0,max=365"`   // 自动转存限制天数(0表示不限制)
	AutoTransferMinSpace      int  `json:"auto_transfer_min_space" validate:"min=100,max=1024"` // 最小存储空间(GB)
	AutoFetchHotDramaEnabled  bool `json:"auto_fetch_hot_drama_enabled"`                        // 自动拉取热播剧名字

	// API配置
	ApiToken string `json:"api_token"` // 公开API访问令牌

	// 其他配置
	PageSize        int  `json:"page_size" validate:"min=10,max=500"`
	MaintenanceMode bool `json:"maintenance_mode"`
}

SystemConfigRequest 系统配置请求

type SystemConfigResponse

type SystemConfigResponse struct {
	ID        uint   `json:"id"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`

	// SEO 配置
	SiteTitle       string `json:"site_title"`
	SiteDescription string `json:"site_description"`
	Keywords        string `json:"keywords"`
	Author          string `json:"author"`
	Copyright       string `json:"copyright"`

	// 自动处理配置组
	AutoProcessReadyResources bool `json:"auto_process_ready_resources"` // 自动处理待处理资源
	AutoProcessInterval       int  `json:"auto_process_interval"`        // 自动处理间隔(分钟)
	AutoTransferEnabled       bool `json:"auto_transfer_enabled"`        // 开启自动转存
	AutoTransferLimitDays     int  `json:"auto_transfer_limit_days"`     // 自动转存限制天数(0表示不限制)
	AutoTransferMinSpace      int  `json:"auto_transfer_min_space"`      // 最小存储空间(GB)
	AutoFetchHotDramaEnabled  bool `json:"auto_fetch_hot_drama_enabled"` // 自动拉取热播剧名字

	// API配置
	ApiToken string `json:"api_token"` // 公开API访问令牌

	// 其他配置
	PageSize        int  `json:"page_size"`
	MaintenanceMode bool `json:"maintenance_mode"`
}

SystemConfigResponse 系统配置响应

type TagResponse

type TagResponse struct {
	ID            uint   `json:"id"`
	Name          string `json:"name"`
	Description   string `json:"description"`
	CategoryID    *uint  `json:"category_id"`
	CategoryName  string `json:"category_name"`
	ResourceCount int64  `json:"resource_count"`
}

TagResponse 标签响应

type UpdateCategoryRequest

type UpdateCategoryRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

UpdateCategoryRequest 更新分类请求

type UpdateCksRequest

type UpdateCksRequest struct {
	PanID       uint   `json:"pan_id"`
	Idx         int    `json:"idx"`
	Ck          string `json:"ck"`
	IsValid     bool   `json:"is_valid"`
	Space       int64  `json:"space"`
	LeftSpace   int64  `json:"left_space"`
	UsedSpace   int64  `json:"used_space"`
	Username    string `json:"username"`
	VipStatus   bool   `json:"vip_status"`
	ServiceType string `json:"service_type"`
	Remark      string `json:"remark"`
}

UpdateCksRequest 更新cookie请求

type UpdatePanRequest

type UpdatePanRequest struct {
	Name   string `json:"name"`
	Key    int    `json:"key"`
	Icon   string `json:"icon"`
	Remark string `json:"remark"`
}

UpdatePanRequest 更新平台请求

type UpdateResourceRequest

type UpdateResourceRequest struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	URL         string `json:"url"`
	PanID       *uint  `json:"pan_id"`
	QuarkURL    string `json:"quark_url"`
	FileSize    string `json:"file_size"`
	CategoryID  *uint  `json:"category_id"`
	IsValid     bool   `json:"is_valid"`
	IsPublic    bool   `json:"is_public"`
	TagIDs      []uint `json:"tag_ids"`
}

UpdateResourceRequest 更新资源请求

type UpdateTagRequest

type UpdateTagRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	CategoryID  *uint  `json:"category_id"`
}

UpdateTagRequest 更新标签请求

type UpdateUserRequest

type UpdateUserRequest struct {
	Username string `json:"username"`
	Email    string `json:"email"`
	Role     string `json:"role"`
	IsActive bool   `json:"is_active"`
}

UpdateUserRequest 更新用户请求

type UserResponse

type UserResponse struct {
	ID        uint       `json:"id"`
	Username  string     `json:"username"`
	Email     string     `json:"email"`
	Role      string     `json:"role"`
	IsActive  bool       `json:"is_active"`
	LastLogin *time.Time `json:"last_login"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt time.Time  `json:"updated_at"`
}

UserResponse 用户响应

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL