/*
*  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.basicdata.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 houjianlan
* @date 2024-09-13
**/
@Entity
@Data
@Table(name="sys_rule_configure")
public class RuleConfigure  extends BaseEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "`id`")
    @ApiModelProperty(value = "id")
    private Long id;

    @Column(name = "`rule_type`")
    @NotBlank
    @ApiModelProperty(value = "规则类型")
    private String ruleType;

    @Column(name = "`sql_content`")
    @NotBlank
    @ApiModelProperty(value = "SQL内容")
    private String sqlContent;

    @Column(name = "`description`")
    @ApiModelProperty(value = "描述")
    private String description;

    @Column(name = "`beyj`")
    @ApiModelProperty(value = "是否发邮件")
    private Boolean beyj=false;

    @Column(name = "`yj_des`")
    @ApiModelProperty(value = "邮件备注")
    private String yjDes;

    @Column(name = "`yj_sjr`")
    @ApiModelProperty(value = "邮件收件人")
    private String yjSjr;

    @Column(name = "`betc`")
    @ApiModelProperty(value = "是否弹窗")
    private Boolean betc=false;

    @Column(name = "`tc_msg`")
    @ApiModelProperty(value = "弹窗消息")
    private String tcMsg;

    @Column(name = "`beys`")
    @ApiModelProperty(value = "颜色标记")
    private Boolean beys=false;

    @Column(name = "`ys_flg`")
    @ApiModelProperty(value = "标记颜色值")
    private String ysFlg;

    @Column(name = "`ys_field`")
    @ApiModelProperty(value = "标记颜色字段")
    private String ysField;

    @Column(name = "`gs_content`")
    @ApiModelProperty(value = "格式校验正则表达式")
    private String gsContent;

    @Column(name = "`bekz1`")
    @ApiModelProperty(value = "扩展1标记")
    private Boolean bekz1=false;

    @Column(name = "`kz1_msg`")
    @ApiModelProperty(value = "扩展1消息")
    private String kz1Msg;

    @Column(name = "`kz1_content`")
    @ApiModelProperty(value = "扩展1内容")
    private String kz1Content;

    @Column(name = "`bekz2`")
    @ApiModelProperty(value = "扩展2标记")
    private Boolean bekz2=false;

    @Column(name = "`kz2_msg`")
    @ApiModelProperty(value = "扩展2消息")
    private String kz2Msg;

    @Column(name = "`kz2_content`")
    @ApiModelProperty(value = "扩展2内容")
    private String kz2Content;

    @Column(name = "`bekz3`")
    @ApiModelProperty(value = "扩展3标记")
    private Boolean bekz3=false;

    @Column(name = "`kz3_msg`")
    @ApiModelProperty(value = "扩展3消息")
    private String kz3Msg;

    @Column(name = "`kz3_content`")
    @ApiModelProperty(value = "扩展3内容")
    private String kz3Content;

    @Column(name = "`bekz4`")
    @ApiModelProperty(value = "扩展4标记")
    private Boolean bekz4=false;

    @Column(name = "`kz4_msg`")
    @ApiModelProperty(value = "扩展4消息")
    private String kz4Msg;

    @Column(name = "`kz4_content`")
    @ApiModelProperty(value = "扩展4内容")
    private String kz4Content;

    @Column(name = "`bekz5`")
    @ApiModelProperty(value = "扩展5标记")
    private Boolean bekz5=false;

    @Column(name = "`kz5_msg`")
    @ApiModelProperty(value = "扩展5消息")
    private String kz5Msg;

    @Column(name = "`kz5_content`")
    @ApiModelProperty(value = "扩展5内容")
    private String kz5Content;


    public void copy(RuleConfigure source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
