chore: initial commit with CI pipeline, review and tasks docs
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
package com.mosquito.project.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ActivityGraphResponse {
|
||||
|
||||
private List<Node> nodes;
|
||||
private List<Edge> edges;
|
||||
|
||||
public ActivityGraphResponse(List<Node> nodes, List<Edge> edges) {
|
||||
this.nodes = nodes;
|
||||
this.edges = edges;
|
||||
}
|
||||
|
||||
public List<Node> getNodes() {
|
||||
return nodes;
|
||||
}
|
||||
|
||||
public void setNodes(List<Node> nodes) {
|
||||
this.nodes = nodes;
|
||||
}
|
||||
|
||||
public List<Edge> getEdges() {
|
||||
return edges;
|
||||
}
|
||||
|
||||
public void setEdges(List<Edge> edges) {
|
||||
this.edges = edges;
|
||||
}
|
||||
|
||||
public static class Node {
|
||||
private String id;
|
||||
private String label;
|
||||
|
||||
public Node(String id, String label) {
|
||||
this.id = id;
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Edge {
|
||||
private String from;
|
||||
private String to;
|
||||
|
||||
public Edge(String from, String to) {
|
||||
this.from = from;
|
||||
this.to = to;
|
||||
}
|
||||
|
||||
public String getFrom() {
|
||||
return from;
|
||||
}
|
||||
|
||||
public void setFrom(String from) {
|
||||
this.from = from;
|
||||
}
|
||||
|
||||
public String getTo() {
|
||||
return to;
|
||||
}
|
||||
|
||||
public void setTo(String to) {
|
||||
this.to = to;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.mosquito.project.dto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ActivityStatsResponse {
|
||||
|
||||
private long totalParticipants;
|
||||
private long totalShares;
|
||||
private List<DailyStats> dailyStats;
|
||||
|
||||
public ActivityStatsResponse(long totalParticipants, long totalShares, List<DailyStats> dailyStats) {
|
||||
this.totalParticipants = totalParticipants;
|
||||
this.totalShares = totalShares;
|
||||
this.dailyStats = dailyStats;
|
||||
}
|
||||
|
||||
public long getTotalParticipants() {
|
||||
return totalParticipants;
|
||||
}
|
||||
|
||||
public void setTotalParticipants(long totalParticipants) {
|
||||
this.totalParticipants = totalParticipants;
|
||||
}
|
||||
|
||||
public long getTotalShares() {
|
||||
return totalShares;
|
||||
}
|
||||
|
||||
public void setTotalShares(long totalShares) {
|
||||
this.totalShares = totalShares;
|
||||
}
|
||||
|
||||
public List<DailyStats> getDailyStats() {
|
||||
return dailyStats;
|
||||
}
|
||||
|
||||
public void setDailyStats(List<DailyStats> dailyStats) {
|
||||
this.dailyStats = dailyStats;
|
||||
}
|
||||
|
||||
public static class DailyStats {
|
||||
private String date;
|
||||
private int participants;
|
||||
private int shares;
|
||||
|
||||
public DailyStats(String date, int participants, int shares) {
|
||||
this.date = date;
|
||||
this.participants = participants;
|
||||
this.shares = shares;
|
||||
}
|
||||
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(String date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public int getParticipants() {
|
||||
return participants;
|
||||
}
|
||||
|
||||
public void setParticipants(int participants) {
|
||||
this.participants = participants;
|
||||
}
|
||||
|
||||
public int getShares() {
|
||||
return shares;
|
||||
}
|
||||
|
||||
public void setShares(int shares) {
|
||||
this.shares = shares;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.mosquito.project.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
public class CreateActivityRequest {
|
||||
|
||||
@NotBlank(message = "活动名称不能为空")
|
||||
@Size(max = 100, message = "活动名称不能超过100个字符")
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "活动开始时间不能为空")
|
||||
private ZonedDateTime startTime;
|
||||
|
||||
@NotNull(message = "活动结束时间不能为空")
|
||||
private ZonedDateTime endTime;
|
||||
|
||||
// Getters and Setters
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ZonedDateTime getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(ZonedDateTime startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public ZonedDateTime getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(ZonedDateTime endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.mosquito.project.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
public class CreateApiKeyRequest {
|
||||
|
||||
@NotNull(message = "活动ID不能为空")
|
||||
private Long activityId;
|
||||
|
||||
@NotBlank(message = "密钥名称不能为空")
|
||||
private String name;
|
||||
|
||||
// Getters and Setters
|
||||
public Long getActivityId() {
|
||||
return activityId;
|
||||
}
|
||||
|
||||
public void setActivityId(Long activityId) {
|
||||
this.activityId = activityId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.mosquito.project.dto;
|
||||
|
||||
public class CreateApiKeyResponse {
|
||||
|
||||
private String apiKey;
|
||||
|
||||
public CreateApiKeyResponse(String apiKey) {
|
||||
this.apiKey = apiKey;
|
||||
}
|
||||
|
||||
// Getter
|
||||
public String getApiKey() {
|
||||
return apiKey;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.mosquito.project.dto;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import java.time.ZonedDateTime;
|
||||
|
||||
public class UpdateActivityRequest {
|
||||
|
||||
@NotBlank(message = "活动名称不能为空")
|
||||
@Size(max = 100, message = "活动名称不能超过100个字符")
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "活动开始时间不能为空")
|
||||
private ZonedDateTime startTime;
|
||||
|
||||
@NotNull(message = "活动结束时间不能为空")
|
||||
private ZonedDateTime endTime;
|
||||
|
||||
// Getters and Setters
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public ZonedDateTime getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(ZonedDateTime startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public ZonedDateTime getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(ZonedDateTime endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user