package com.yunzhupaas.base.model.dbtable.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import com.yunzhupaas.database.model.dbtable.DbTableFieldModel;
import lombok.Data;
import lombok.NoArgsConstructor;

import jakarta.validation.constraints.NotBlank;

/**
 *
 * @author 云筑产品开发平台组
 * @version V3.1.0
 * @copyright 深圳市乐程软件有限公司
 * @date 2024/3/12 15:31
 */
@Data
@NoArgsConstructor
public class DbTableVO {

    @NotBlank(message = "必填")
    @Schema(description = "表名")
    private String table;
    @NotBlank(message = "必填")
    @Schema(description = "表注释")
    private String tableName;

    public DbTableVO(DbTableFieldModel dbTableFieldModel){
        this.table = dbTableFieldModel.getTable();
        this.tableName = dbTableFieldModel.getComment();
    }

}

