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

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 项目名: yhlxj2
 * 文件名: GoodsFrontListCategoryView
 * 创建者: JavaZou
 * 创建时间:2023/10/12 14:40
 */
@Getter
@Setter
@SearchBean(tables = "goods_don g left join goods_don_category_relate gcr on gcr.goods_id = g.id",
		where = "g.deleted is true and g.status is true and g.is_hide is false :condition:",
		orderBy = "gcr.sorted asc, g.id")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class GoodsFrontListCategoryView {
	@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;

	/**
	 * 分类
	 * 1、AI  2、流媒体
	 */
	@DbField("gcr.category")
	private Long category;

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

	@DbField("g.second_type")
	private Integer secondType;

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

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

	/**
	 * 渠道优惠折扣
	 */
	@DbIgnore
	private BigDecimal channelDiscount;

	/**
	 * 优惠价格
	 */
	@DbIgnore
	private BigDecimal discountPrice;

	/**
	 * 优惠折扣
	 */
	@DbIgnore
	private BigDecimal discount;

	/**
	 * 满减金额
	 */
	@DbIgnore
	private BigDecimal reduceMoney;

	/**
	 * 优惠券有效结束时间
	 */
	@DbIgnore
	private Date validEndTime;

	/**
	 * 优惠券id
	 */
	@DbIgnore
	private Long couponId;

	/**
	 * 支付来源
	 * 0全无 1.优惠券 2.渠道 3特定价格
	 */
	@DbIgnore
	private Integer source = 0;

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

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

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

	@DbIgnore
	private BigDecimal specificPrice;

	@DbIgnore
	private Long specificSkuId;

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

	/**
	 * 是否是特定价格平台
	 */
	@DbField("g.is_sp")
	private Boolean isSp;


	@DbField("g.is_owns")
	private Boolean isOwns;

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

	@DbField("g.match_img")
	private String matchImg;

	/**
	 * 背景图
	 */
	@DbField("g.img")
	private String goodsImg;

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

	/**
	 * gpt赠送天卡活动标识 默认false
	 */
	@DbIgnore
	private Boolean isGptGift = false;

	@DbIgnore
	private List<GoodsDonSkuFrontView> skuList;

	@DbIgnore
	private GoodsDonSpecFrontView specs;

	@DbIgnore
	private OrderCommentFrontView comments;
}
