package com.pwt.netty.common.vehicle2old.client;

import com.pwt.netty.common.vehicle2old.RequestData;
import io.netty.buffer.ByteBuf;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author linyun
 * @version V1.0
 * @Title: SettlementConfirmData
 * @Description: 结算确认
 * @date 2022/11/15
 **/
@Data
@EqualsAndHashCode
public class SettlementConfirmData extends RequestData {

    private byte settlement = 0X55;

    /***
     * 子类编码
     * @param byteBuf
     */
    @Override
    protected void encodeInternal(ByteBuf byteBuf)
    {
        byteBuf.writeByte(settlement);
    }

    /**
     * 子类解码
     *
     * @param byteBuf
     */
    @Override
    protected void decodeInternal(ByteBuf byteBuf)
    {
        this.settlement = byteBuf.readByte();
    }
}
