/*
 *  Copyright 2019-2020 Zheng Jie
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.youchain.domain;

import com.youchain.base.BaseEntity;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
 * @website https://eladmin.vip
 * @description /
 * @author baobl
 * @date 2024-09-20
 **/
@Entity
@Data
@Table(name="sys_excel_config_key")
public class ExcelConfigKey  extends BaseEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    @ApiModelProperty(value = "主键")
    private Long id;
    @Column(name = "`table_name`")
    @ApiModelProperty(value = "关联表")
    private String tableName;
    @Column(name = "`key_name`")
    @ApiModelProperty(value = "映射字段")
    private String keyName;

    @Column(name = "`table_column_name`")
    @ApiModelProperty(value = "关联表字段名")
    private String tableColumnName;

    @Column(name = "`table_column_type`")
    @ApiModelProperty(value = "关联表字段类型")
    private String tableColumnType;
    public void copy(ExcelConfigKey source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
