CatchTheLettersBackend/src/main/java/com/example/catchTheLetters/entity/RoomAction.java

41 lines
977 B
Java

package com.example.catchTheLetters.entity;
import com.example.catchTheLetters.enums.RoomActionType;
import lombok.Data;
import java.io.Serializable;
@Data
public class RoomAction implements Serializable {
private RoomActionType type;
// 创建或加入房间时的token
private String token;
// 房主踢出玩家时或被邀请的玩家ID
private String userID;
private long roomID;
public RoomAction() {
}
public RoomAction(RoomActionType type, String token, String userID, long roomID) {
this.type = type;
this.token = token;
this.userID = userID;
this.roomID = roomID;
}
public RoomAction(RoomActionType type, String userID) {
this.type = type;
this.userID = userID;
}
public RoomAction(RoomActionType type, long roomID) {
this.type = type;
this.roomID = roomID;
}
public RoomAction(RoomActionType type) {
this.type = type;
}
}