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.Getter;
import lombok.Setter;

import java.math.BigDecimal;

/**
 * 项目名: yhlxj2
 * 文件名: GoodsDonSkuSubsidyFrontView
 * 创建者: JavaZou
 * 创建时间:2024/4/11 14:18
 */
@Getter
@Setter
@SearchBean(tables = "goods_don_sku_subsidy gs inner join goods_don_sku sku on gs.sku_id = sku.id inner join goods_don g on sku.goods_id = g.id",
		where = "gs.status is true and gs.deleted is true and sku.status is true and g.deleted is true"
		, groupBy = "g.id,g.title,g.tags,g.virtual_sold",
		orderBy = "g.sort_by asc, g.id")
public class GoodsDonSkuSubsidyFrontView {
	@DbField("g.id")
	private Long id;

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

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

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

	@DbIgnore
	private Long skuId;

	/**
	 * 最低规格价格
	 */
	@DbField("min(gs.price)")
	private BigDecimal price;

	/**
	 * 商品原价
	 */
	@DbIgnore
	private BigDecimal oriPrice;

	@DbIgnore
	private String picture;

	@DbIgnore
	private Integer months;

	@DbIgnore
	private Integer days;


	/**
	 * 已售
	 */
	@DbField("g.virtual_sold")
	private Integer sold;
}
