package com.cm.common.plugin.pojo.vos.database.table;

import com.cm.common.annotation.CheckEmptyAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: TableNewColumnVO
 * @Description: 新表列
 * @Author: WangGeng
 * @Date: 2019/11/16 1:55 下午
 * @Version: 1.0
 **/
@ApiModel
public class TableOldColumnVO extends TableColumnVO {

    @ApiModelProperty(name = "oldColumnName", value = "旧字段名称")
    @CheckEmptyAnnotation(name = "旧字段名称")
    private String oldColumnName;

    public String getOldColumnName() {
        return oldColumnName == null ? "" : oldColumnName.trim();
    }

    public void setOldColumnName(String oldColumnName) {
        this.oldColumnName = oldColumnName;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"oldColumnName\":")
                .append("\"").append(oldColumnName).append("\"");
        sb.append('}');
        return sb.toString();
    }
}
