add draft

pull/882/head
chanhengseang 2025-05-25 22:51:47 -07:00
parent 0db1390bcd
commit c43cfc082f
4 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,4 @@
-- Add check_in_at and group_count columns to event table
ALTER TABLE event
ADD COLUMN check_in_at TIMESTAMP NULL COMMENT 'Check-in time',
ADD COLUMN group_count INT NULL COMMENT 'Number of groups';

View File

@ -41,6 +41,8 @@ import java.util.List;
@Entity
@Data
@Table(name="event")
@SQLDelete(sql = "update event set status = 'DELETED' where id = ?", check = ResultCheckStyle.COUNT)
@Where(clause = "status != 'DELETED'")
public class Event implements Serializable {
@Id
@ -86,6 +88,14 @@ public class Event implements Serializable {
@ApiModelProperty(value = "Update time", hidden = true)
private Timestamp updateTime;
@Column(name = "`check_in_at`")
@ApiModelProperty(value = "Check in time", hidden = true)
private Timestamp checkInAt;
@Column(name = "`group_count`")
@ApiModelProperty(value = "Number of groups")
private Integer groupCount;
@Column(name = "`sort`")
@ApiModelProperty(value = "Sort")
private Integer sort;

View File

@ -87,6 +87,12 @@ public class EventDto implements Serializable {
private boolean allowWaitList;
@ApiModelProperty(value = "Check-in time")
private Timestamp checkInAt;
@ApiModelProperty(value = "Number of groups")
private Integer groupCount;
@ApiModelProperty(value = "Co-host players")
private List<PlayerDto> coHostPlayers;
}

View File

@ -1,7 +1,10 @@
package com.srr.enumeration;
public enum EventStatus {
DRAFT,
OPEN,
CHECK_IN,
IN_PROGRESS,
CLOSED
CLOSED,
DELETED
}