package beilv.competition.domain;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Date;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class RedisTask {
    private String competitionId;
    private String competitionState;
    private String paymentStatus;
    private String orderType;
    private String busId;

    public RedisTask(String competitionId, String competitionState, String paymentStatus) {
        this.competitionId = competitionId;
        this.competitionState = competitionState;
        this.paymentStatus = paymentStatus;
    }

    public String toString() {
        try {
            ObjectMapper objectMapper = new ObjectMapper();
            return objectMapper.writeValueAsString(this);
        } catch (Exception var2) {
            var2.printStackTrace();
            return super.toString();
        }
    }
}
