BerthChangeEvent.java 1.46 KB
package com.zteits.park.event;

import com.zteits.park.domain.TpPBerths;
import org.springframework.context.ApplicationEvent;

/**
 * Copyright: Copyright (c) 2019  zteits
 *
 * @ClassName: com.zteits.park.event
 * @Description:
 * @version: v1.0.0
 * @author: atao
 * @date: 2019-04-01   15:19
 * Modification History:
 * Date         Author          Version      Description
 * ---------------------------------------------------------*
 * 2019-04-01      atao          v1.0.0          创建
 */
public class BerthChangeEvent extends ApplicationEvent {

    public enum BerthEventEnum {
        //新增
        ADD,
        //修改
        MODIFY,
        //删除
        DELETE

    }

    private BerthEventEnum berthEventEnum;

    private TpPBerths tpPBerths;

    /**
     * Create a new ApplicationEvent.
     *
     * @param source the object on which the event initially occurred (never {@code null})
     */
    public BerthChangeEvent(BerthEventEnum berthEventEnum, TpPBerths tpPBerths) {

        super(new Object());
        this.berthEventEnum = berthEventEnum;
        this.tpPBerths = tpPBerths;

    }

    public BerthEventEnum getBerthEventEnum() {
        return berthEventEnum;
    }

    public void setBerthEventEnum(BerthEventEnum berthEventEnum) {
        this.berthEventEnum = berthEventEnum;
    }

    public TpPBerths getTpPBerths() {
        return tpPBerths;
    }

    public void setTpPBerths(TpPBerths tpPBerths) {
        this.tpPBerths = tpPBerths;
    }
}