package com.cyksj.model.views;

import com.baomidou.mybatisplus.annotation.TableId;
import com.ejlchina.searcher.bean.DbField;
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 " +
        "left join goods_don_sku s on up.sku_id = s.id", where = "up.deleted = true")
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_id")
    private Long skuId;

    /**
     * 商品规格名称
     */
    @DbField("s.spec_val")
    private String specVal;

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

    /**
     * 数量
     */
    @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;
}
