package com.cirle.scientific.po;/*
 *24901
 *2022/11/10
 *10:11
 */

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

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 24901
 */
@Entity
@Data
@Table(name="qkj_photowall")
public class QkjPhotoWall implements Serializable {

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

    @Column(name = "type")
    @ApiModelProperty(value = "类型: 1:课程 2:直播 3:会议")
    private Integer type;

    @Column(name = "obj_id")
    @ApiModelProperty(value = "type类型对应的id")
    private Integer objId;

    @Column(name = "height")
    @ApiModelProperty(value = "照片的高度")
    private Integer height;

    @Column(name = "width")
    @ApiModelProperty(value = "宽度")
    private Integer width;

    @Column(name = "url")
    @ApiModelProperty(value = "照片路径")
    private String url;

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

    @Column(name = "sort")
    @ApiModelProperty(value = "排序")
    private Integer sort;

    @Column(name = "state")
    @ApiModelProperty(value = "状态 0:未删除 1删除")
    private Integer state;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @Column(name = "update_time")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

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

}
