/*
*  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 me.zhengjie.modules.dm.dmReadingRoomConfigOverdue.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import me.zhengjie.base.BaseEntity;

import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author longda
* @date 2022-03-02
**/
@Entity
@Data
@Table(name="dm_reading_room_config_overdue")
public class DmReadingRoomConfigOverdue extends BaseEntity implements Serializable {

    @Id
    @Column(name = "config_overdue_id")
    @ApiModelProperty(value = "设置逾期时间id")
    private String configOverdueId;

    @Column(name = "config_overdue_content")
    @ApiModelProperty(value = "设置逾期时间内容")
    @NotNull(groups = {BaseEntity.Update.class,BaseEntity.Create.class})
    private String configOverdueContent;

    @Column(name = "config_overdue_lable")
    @ApiModelProperty(value = "设置逾期时间类型")
    private String configOverdueLabel;
    public void copy(DmReadingRoomConfigOverdue source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}