1
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
package com.gameplatform.server.model.dto.link;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 链接列表项DTO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "链接列表项")
|
||||
public class LinkListItem {
|
||||
|
||||
@Schema(description = "链接编号", example = "ABC12345")
|
||||
private String codeNo;
|
||||
|
||||
@Schema(description = "批次ID", example = "123")
|
||||
private Long batchId;
|
||||
|
||||
@Schema(description = "链接状态", example = "NEW")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "状态描述", example = "新建")
|
||||
private String statusDesc;
|
||||
|
||||
@Schema(description = "过期时间", example = "2024-01-15T16:30:00")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime expireAt;
|
||||
|
||||
@Schema(description = "是否已过期", example = "false")
|
||||
private Boolean isExpired;
|
||||
|
||||
@Schema(description = "剩余时间(秒)", example = "3600")
|
||||
private Long remainingSeconds;
|
||||
|
||||
@Schema(description = "每次奖励数量", example = "50")
|
||||
private Integer quantity;
|
||||
|
||||
@Schema(description = "执行次数", example = "5")
|
||||
private Integer times;
|
||||
|
||||
@Schema(description = "总奖励点数", example = "250")
|
||||
private Integer totalPoints;
|
||||
|
||||
@Schema(description = "分配区域", example = "Q")
|
||||
private String region;
|
||||
|
||||
@Schema(description = "机器ID", example = "MACHINE001")
|
||||
private String machineId;
|
||||
|
||||
@Schema(description = "登录时间", example = "2024-01-15T14:30:00")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime loginAt;
|
||||
|
||||
@Schema(description = "创建时间", example = "2024-01-15T12:00:00")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createdAt;
|
||||
|
||||
@Schema(description = "更新时间", example = "2024-01-15T12:00:00")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updatedAt;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.gameplatform.server.model.dto.link;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Max;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 链接列表查询请求DTO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "链接列表查询请求")
|
||||
public class LinkListRequest {
|
||||
|
||||
@Schema(description = "页码,从1开始", example = "1")
|
||||
@Min(value = 1, message = "页码必须大于0")
|
||||
private Integer page = 1;
|
||||
|
||||
@Schema(description = "每页大小", example = "20")
|
||||
@Min(value = 1, message = "每页大小必须大于0")
|
||||
@Max(value = 100, message = "每页大小不能超过100")
|
||||
private Integer pageSize = 20;
|
||||
|
||||
@Schema(description = "链接状态过滤", example = "NEW")
|
||||
private String status;
|
||||
|
||||
@Schema(description = "批次ID过滤", example = "123")
|
||||
private Long batchId;
|
||||
|
||||
@Schema(description = "是否过期过滤", example = "false")
|
||||
private Boolean isExpired;
|
||||
|
||||
@Schema(description = "排序字段", example = "createdAt", allowableValues = {"createdAt", "updatedAt", "expireAt"})
|
||||
private String sortBy = "createdAt";
|
||||
|
||||
@Schema(description = "排序方向", example = "DESC", allowableValues = {"ASC", "DESC"})
|
||||
private String sortDir = "DESC";
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.gameplatform.server.model.dto.link;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 链接列表响应DTO
|
||||
*/
|
||||
@Data
|
||||
@Schema(description = "链接列表响应")
|
||||
public class LinkListResponse {
|
||||
|
||||
@Schema(description = "链接列表")
|
||||
private List<LinkListItem> items;
|
||||
|
||||
@Schema(description = "总记录数", example = "150")
|
||||
private Long total;
|
||||
|
||||
@Schema(description = "当前页码", example = "1")
|
||||
private Integer page;
|
||||
|
||||
@Schema(description = "每页大小", example = "20")
|
||||
private Integer pageSize;
|
||||
|
||||
@Schema(description = "总页数", example = "8")
|
||||
private Integer totalPages;
|
||||
|
||||
@Schema(description = "是否有下一页", example = "true")
|
||||
private Boolean hasNext;
|
||||
|
||||
@Schema(description = "是否有上一页", example = "false")
|
||||
private Boolean hasPrev;
|
||||
}
|
||||
@@ -98,4 +98,3 @@ public class LinkStatusResponse {
|
||||
public LocalDateTime getUpdatedAt() { return updatedAt; }
|
||||
public void setUpdatedAt(LocalDateTime updatedAt) { this.updatedAt = updatedAt; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user