package com.cyksj.model.manage.views;

import com.cyksj.model.entity.GoodsDon;
import com.cyksj.model.entity.GoodsDonSku;
import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.DbIgnore;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

/**
 * @author chan
 * @date 2022/9/27 6:00 PM
 */
@Getter
@Setter
@ToString
@SearchBean(tables = "goods_don g left join goods_don_spec gs on g.id = gs.goods_id")
public class GoodsDonViewer {
    /**
     * 商品id
     */
    @DbField("g.id")
    private Long id;


    /**
     * 商品录入人
     */
    @DbField("g.writer")
    private String writer;

    /**
     * 标签
     */
    @DbField("g.tags")
    private String tags;

    /**
     * 商品名称
     */
    @DbField("g.title")
    private String title;

    /**
     * 缩略图
     */
    @DbField("g.logo")
    private String logo;

    @DbField("img")
    private String img;

    /**
     * 视频封面
     */
    @DbField("g.video_cover")
    private String videoCover;


    /**
     * true 上架 / false 下架
     */
    @DbField("g.status")
    private Boolean status;

    /**
     * 是否隐藏
     */
    @DbField("g.is_hide")
    private Boolean isHide;

    /**
     * true 存在 / false 删除
     */
    @DbField("g.deleted")
    private Boolean deleted;

    @DbField("gs.id")
    private Long specId;

    @DbField("gs.goods_id")
    private Long goodsId;

    /**
     * 商品总规格 json
     */
    @DbField("gs.specs_json")
    private String specsJson;

    /**
     * 规格属性值最大id
     */
    @DbField("gs.max_id")
    private Integer maxId;

    /**
     * 商品规格数量
     */
    @DbField("gs.spec_number")
    private Integer specNumber;

    /**
     * 属性id - 整体 映射
     */
    @DbField("gs.spec_mapping")
    private String specMapping;

    /**
     * 详情
     */
    @DbField("g.detail")
    private String detail;

    /**
     * 类型
     */
    @DbField("g.type")
    private Integer type;

    /**
     * 平台分类展示
     */
    @DbIgnore
    private List<Long> categoryList;

    /**
     * banner
     */
    @DbField("g.banner")
    private String banner;

    /**
     * 商品搭配图
     */
    @DbField("g.match_img")
    private String matchImg;

    /**
     * 是否贴片 false
     */
    @DbField("g.is_patch")
    private Boolean isPatch;

    /**
     * H5标签
     */
    @DbField("g.mobile_tags")
    private String mobileTags;

    /**
     * 二级分类
     * 虚物品 1邀请制 2非邀请制
     */
    @DbField("g.second_type")
    private Integer secondType;

    @DbField("g.rate")
    private Integer rate;

    /**
     * 第二分销比例 不包含套餐
     */
    @DbField("g.second_rate")
    private Integer secondRate;

    @DbField("g.sort_by")
    private Integer sortBy;

    @DbField("g.virtual_sold")
    private Integer virtualSold;

    @DbField("g.pay_desc")
    private String payDesc;

    @DbField("g.buy_desc")
    private String buyDesc;

    @DbField("g.special_type")
    private GoodsDon.SpecialType specialType;

    /**
     * 用户端车票展示字段
     */
    @DbField("g.show_field_info")
    private String showFieldInfo;

    @DbIgnore
    private List<GoodsDonSku> skus;

    @DbField("g.video")
    private String video;

    /**
     * 推荐标题
     */
    @DbField("g.recommend_title")
    private String recommendTitle;

    /**
     * 推荐平台
     */
    @DbField("g.recommend_goods")
    private String recommendGoods;

    /**
     * 是否参与分销 默认参与
     */
    @DbField("g.is_distribute")
    private Boolean isDistribute;

    @DbField("g.is_sku_distribute")
    private Boolean isSkuDistribute;

    @DbIgnore
    private List<Long> recommendGoodsList;
}
