package com.cyksj.model.views;

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;
import java.util.List;

/*
 *项目名: yhlxj
 *文件名: YhShopGoodsSkuFrontView
 *创建者: JavaZou
 *创建时间:2023/9/19 16:10
 */
@Getter
@Setter
@SearchBean(tables = "(select * from yh_shop_goods_sku ys where status is true and deleted is true :condition:) ygs inner join goods_don_sku sku on sku.id = ygs.sku_id",
		where = "sku.status is true")
public class YhShopGoodsSkuFrontView {
	@DbField("sku.id")
	private Long id;

	@DbField("sku.goods_id")
	private Long goodsId;


	@DbField("sku.sub_title")
	private String subTitle;

	/**
	 * 商品规格 ids
	 */
	@DbField("sku.spec_ids")
	private String specIds;

	/**
	 * 商品规格 value
	 */
	@DbField("sku.spec_val")
	private String specVal;

	/**
	 * 商品规格 json
	 */
	@DbField("sku.spec_json")
	private String specJson;

	/**
	 * 规格说明信息
	 */
	@DbField("sku.notify_text")
	private String notifyText;

	/**
	 * 规格框提示
	 */
	@DbField("sku.small_msg")
	private String smallMsg;

	/**
	 * 商品预览图
	 */
	@DbField("sku.picture")
	private String picture;

	/**
	 * 商品详情图
	 */
	@DbField("sku.detail")
	private String detail;

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


	/**
	 * 店铺设置的规格价格
	 */
	@DbField("ygs.price")
	private BigDecimal price;

	/**
	 * 月数
	 */
	@DbField("sku.months")
	private Integer months;

	/**
	 * 天数
	 */
	@DbField("sku.days")
	private Integer days;

//	@DbField("case when sku.spec_val like '%月%' and sku.spec_val not like '%年%' then 0 when sku.spec_val like '%季%' then 1 when sku.spec_val like '%半年%' then 2 when sku.spec_val like '%年%' then 3 else 66 end")
//	private Integer orderBy;

	@DbField("sku.sorted")
	private Integer sorted;

	@DbField("sku.is_dp")
	private Boolean isDp;

	/**
	 * 优惠加购商品
	 */
	@DbIgnore
	private List<GoodsDiscountPlusPurchaseRelationFrontView> dpSkuViews;

	/**
	 * 特定价格
	 */
	@DbField("sku.specific_price")
	private BigDecimal specificPrice;

	/**
	 * 特定购买平台
	 */
	@JsonIgnore
	private String specificGoodsIds;

	/**
	 * 限制次数
	 */
	@DbField("sku.gpt_limit_num")
	private Integer gptLimitNum;

	/**
	 * 限制时间
	 */
	@DbField("sku.gpt_limit_time")
	private Long gptLimitTime;

	@DbField("sku.is_car")
	private Boolean isCar;

	@DbField("sku.is_mirror")
	private Boolean isMirror;

	/**
	 * mj fast次数
	 */
	@DbField("sku.mj_fast_num")
	private Integer mjFastNum;

	/**
	 * mj relax次数
	 */
	@DbField("sku.mj_relax_num")
	private Integer mjRelaxNum;

	@DbField("sku.luma_num")
	private Integer lumaNum;

	/**
	 * deepseek限制次数
	 */
	@DbField("sku.ds_limit_num")
	private Integer dsLimitNum;

	/**
	 * deepseek限制时间
	 */
	@DbField("sku.ds_limit_time")
	private Long dsLimitTime;

	/**
	 * 其他模型限制次数
	 */
	@DbField("sku.other_limit_num")
	private Integer otherLimitNum;

	/**
	 * 其他模型限制时间
	 */
	@DbField("sku.other_limit_time")
	private Long otherLimitTime;

	@DbField("sku.remark")
	private Boolean remark;

	/**
	 * claude code每日限额
	 */
	@DbField("sku.claude_daily_limit")
	private Integer claudeDailyLimit;

	/**
	 * Claude code 服务总额度
	 */
	@DbField("sku.claude_quota")
	private Integer claudeQuota;

	/**
	 * nano总配额次数
	 */
	@DbField("sku.nano_quota")
	private Integer nanoQuota;

	/**
	 * cc最高约可使用次数
	 */
	@DbField("sku.highest_usage")
	private Integer highestUsage;

	/**
	 * 是否赠送codex
	 */
	@DbField("sku.is_codex")
	private Boolean isCodex;

	/**
	 * codex套餐名
	 */
	@DbField("sku.codex_plan_name")
	private String codexPlanName;

	/**
	 * 每日预算上限
	 */
	@DbField("sku.openai_daily_limit")
	private Integer openaiDailyLimit;

	/**
	 * 每月预算上限
	 */
	@DbField("sku.openai_quota")
	private Integer openaiQuota;
}
