package com.brilliance.isc.common.rmbbop.vo;

import com.brilliance.isc.common.rmbbop.common.AbstractRmb;
import com.brilliance.isc.common.rmbbop.model.Tcpgrp;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

import static com.brilliance.mda.runtime.mda.Constants.NULLDATE;
import static com.brilliance.mda.runtime.mda.Constants.NULLSTR;

@EqualsAndHashCode(callSuper = true)
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class Rmb2135 extends AbstractRmb {
    //Internal Unique ID
    private String inr = NULLSTR;

    /**
     * Initial Entity Code
     */
    private String ownextkey = NULLSTR;

    /**
     * 业务发生日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date reldat = NULLDATE;

    private Tcpgrp recgrp;

    /**
     * 交易类型：修改/删除
     */
    private String transfer;

    @Override
    public String getObjtyp() {
        return "TCP";
    }

    @Override
    public void clear() {
        super.clear();
        recgrp = new Tcpgrp();
        recgrp.reset();
    }

    @Override
    public void reset() {
        super.reset();
        if (recgrp == null) {
            recgrp = new Tcpgrp();
        }
        recgrp.reset();
    }
}
