package com.kym.entity.delay;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 延迟队列使用活动对象
 *
 * @author skyline
 * @since 2023-08-08
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class DelayActivity implements Serializable {

    public static String TYPE_启动 = "start";
    public static String TYPE_结束 = "end";

    private static final long serialVersionUID = 1L;

    /**
     * 主活动id
     */
    private Long id;

    /**
     * 活动名称
     */
    private String name;
    /**
     * 开始或者结束时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime executeTime;

    /**
     * 类型：启动或结束
     */
    private String type;

    /**
     * 折扣类型:
     * 优惠券：Coupon
     */
    private String discountType;

}
