80 lines
1.8 KiB
Java
80 lines
1.8 KiB
Java
package com.muyu.domain;
|
|
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
import com.muyu.common.core.annotation.Excel;
|
|
import com.muyu.common.core.web.domain.BaseEntity;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Data;
|
|
import lombok.EqualsAndHashCode;
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.experimental.SuperBuilder;
|
|
|
|
@Data
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
@SuperBuilder
|
|
@EqualsAndHashCode(callSuper = true)
|
|
@TableName(value = "table_info") //数据库表相关
|
|
public class TableInfo extends BaseEntity {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
/**
|
|
* 主键
|
|
*/
|
|
@TableId(value = "id", type = IdType.AUTO)
|
|
private Long id;
|
|
|
|
//数据源主键
|
|
private Long basicId;
|
|
|
|
/**
|
|
* 表名称/数据库
|
|
*/
|
|
@Excel(name = "表名称/数据库")
|
|
private String tableName;
|
|
|
|
/**
|
|
* 表备注
|
|
*/
|
|
@Excel(name = "表备注")
|
|
private String tableRemark;
|
|
|
|
/**
|
|
* 表的数据来源
|
|
*/
|
|
@Excel(name = "数据来源类型")
|
|
private String type;
|
|
|
|
/**
|
|
* 数据量
|
|
*/
|
|
@Excel(name = "数据量")
|
|
private Long dataNum;
|
|
|
|
/**
|
|
* 是否核心 'Y'是 'N'不是
|
|
*/
|
|
@Excel(name = "是否核心 'Y'是 'N'不是")
|
|
private String center;
|
|
|
|
private Long parentId;
|
|
|
|
|
|
public static TableInfoResp toTableInfoResp(TableInfo tableInfo) {
|
|
return TableInfoResp.builder()
|
|
.id(tableInfo.id)
|
|
.parentId(tableInfo.parentId)
|
|
.basicId(tableInfo.basicId)
|
|
.tableName(tableInfo.tableName)
|
|
.tableRemark(tableInfo.tableRemark)
|
|
.isCenter(tableInfo.center)
|
|
.dataNum(tableInfo.dataNum)
|
|
.build();
|
|
}
|
|
|
|
|
|
}
|