
package com.cyksj.model.views;

import com.cyksj.model.entity.GoodsDon;
import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.DbIgnore;
import com.ejlchina.searcher.bean.SearchBean;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;

/*
 *项目名: netflix
 *文件名: GoodsHomePageView
 *创建者: JavaZou
 *创建时间:2023/4/14 11:12
 */
@Getter
@Setter
@SearchBean(tables = "goods_don g",
		where = "g.deleted is true and g.status is true and g.type = 1",
		orderBy = "g.sort_by asc, g.id")
public class GoodsHomePageView {
	@DbField("g.id")
	private Long id;

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

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

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

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

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

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

	/**
	 * 最低规格月份
	 */
	@DbField("g.min_months")
	private Integer months;

	/**
	 * 最低规格天数
	 */
	@DbField("g.min_days")
	private Integer days;

	/**
	 * 已售
	 */
	@DbIgnore
	private Integer sold;

	/**
	 * 虚拟销量
	 */
	@DbField("g.virtual_sold")
	@JsonIgnore
	private Integer virtualSold;

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

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

	/**
	 * 购买通知信息
	 */
	@DbIgnore
	private String notifyMsg;
}