/*
*  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.cirle.scientific.dto;

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;

/**
* @website https://el-admin.vip
* @description /
* @author Young
* @date 2022-06-22
**/
@Data
public class QkjSearchdataDto implements Serializable {

    @ApiModelProperty(value = "id")
    private Integer id;

    @ApiModelProperty(value = "1-课程 2-课程子课时 3-直播 4-资讯 5-会议 ")
    private Integer obj_type;

    @ApiModelProperty(value = "对象ID")
    private Integer obj_id;

    @ApiModelProperty(value = "对象父级ID")
    private Integer obj_pid;

    @ApiModelProperty(value = "对象标题")
    private String obj_title;

    @ApiModelProperty(value = "作者 逗号分隔")
    private String authors;

    @ApiModelProperty(value = "对象标签，逗号分隔")
    private String obj_tags;

    @ApiModelProperty(value = "对象封面图")
    private String obj_cover_img;

    @ApiModelProperty(value = "是否对外售卖  0、可售卖  1、不对外售卖 （专区）")
    private Integer is_sell;

    @ApiModelProperty(value = "支付价格")
    private Double price;

    @ApiModelProperty(value = "是否支持积分兑换  0：不支持  1：支持")
    private Integer point_flag;

    @ApiModelProperty(value = "积分兑换所需积分(如果支持积分兑换此值大于0)")
    private Integer point;

    @ApiModelProperty(value = "是不是专区  0:否 1:是")
    private String zq_flag;

    @ApiModelProperty(value = "子课时数量")
    private Integer son_count;

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