package com.cyksj.model.views;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.DbIgnore;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author zwhui
 * @date 2024/4/24 15:20
 */
@Data
@SearchBean(tables = "upgrade_package up left join goods_don g on up.goods_id = g.id "
        , where = "up.deleted = true :sku:",
        orderBy = "up.num asc")
public class UpgradePackageView {
    @DbField("up.id")
    private Long id;

    /**
     * 套餐名称
     */
    @DbField("up.name")
    private String name;

    /**
     * 商品id
     */
    @DbField("up.goods_id")
    private Long goodsId;

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

    /**
     * 商品规格id
     */
    @DbField("up.sku_ids")
    private String skuIds;

    /**
     * 升级规格
     */
    @DbField("up.upgrade_sku_id")
    private Long upgradeSkuId;

    /**
     * gpt类型,0.车票套餐
     */
    @DbField("up.gpt_type")
    private Integer gptType;

    /**
     * 商品规格名称
     */
    @DbIgnore
    private String specVal;

    /**
     * 套餐价格
     */
    @DbField("up.price")
    private BigDecimal price;

    /**
     * 小时
     */
    @DbField("up.time")
    private Integer time;

    /**
     * 数量
     */
    @DbField("up.num")
    private Integer num;

    /**
     * 备注
     */
    @DbField("up.remark")
    private String remark;

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

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