package com.brilliance.isc.vo.collection;

import com.brilliance.mda.runtime.mda.util.MdaUtils;
import com.brilliance.isc.common.vo.AbstractCommonVo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class Docgrd extends AbstractCommonVo {

    private String cmail1;

    private String cmail2;

    private String docnam;

    private String tcddoc;

    /**
     * docnamToUpperCase
     * only docname toUpperCase
     *
     * @return a new Docgrd
     *
     */
    public Docgrd docnamToUpperCase(){
        Docgrd docgrd = new Docgrd();
        docgrd.setCmail1(this.cmail1);
        docgrd.setCmail2(this.cmail2);

        if(!MdaUtils.isEmpty(this.docnam)){
            docgrd.setDocnam(this.docnam.toUpperCase());
        }

        docgrd.setTcddoc(this.tcddoc);
        return docgrd;
    }
}
