/*
*  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.dmtsCollection.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-01
**/
@Entity
@Data
@Table(name="dm_ts_collection")
public class DmTsCollection extends BaseEntity implements Serializable {

    @Id
    @Column(name = "collection_sin")
    @ApiModelProperty(value = "图书条形码号")
    private String collectionSin;

    @Column(name = "ts_id")
    @ApiModelProperty(value = "图书id（可以重复  一对多）")
    private Long tsId;

    @Column(name = "ts_login_num")
    @ApiModelProperty(value = "图书标识")
    private String tsLoginNum;

    @Column(name = "ts_collection_address")
    @ApiModelProperty(value = "图书存放位置")
    private String tsCollectionAddress;


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