package com.ylcm.sys.vo;


import org.springframework.beans.BeanUtils;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ylcm.sys.domain.AdProduct;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ad_product")
@ApiModel(value="AdProduct对象", description="产品管理表")
public class AdProductVO {

	@TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "产品名")
    @TableField("product_name")
    private String productName;

    @ApiModelProperty(value = "型号LOGO")
    @TableField("name_img_url")
    private String nameImgUrl;

    @ApiModelProperty(value = "品牌")
    @TableField("brand_name")
    private String brandName;

    @ApiModelProperty(value = "品牌LOGO")
    @TableField("brand_img_url")
    private String brandImgUrl;

    @ApiModelProperty(value = "一级行业")
    @TableField("first_ind")
    private String firstInd;

    @ApiModelProperty(value = "二级行业")
    @TableField("second_ind")
    private String secondInd;
    
    public static AdProductVO from(AdProduct adProduct) {
    	AdProductVO adProductVO = new AdProductVO();
    	BeanUtils.copyProperties(adProduct, adProductVO);
    	return adProductVO;
    }
}
