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

/**
 * 项目名: yhlxj2
 * 文件名: RenewUpgradePackageFrontView
 * 创建者: JavaZou
 * 创建时间:2024/7/19 15:19
 */
@Getter
@Setter
@SearchBean(tables = "renew_upgrade_package rup" +
		" inner join goods_don g on g.id = rup.goods_id",
		where = "g.status is true and rup.status is true and rup.deleted is true")
public class RenewUpgradePackageFrontView {
	@DbField("rup.id")
	private Long packageId;

	@DbField("rup.discount")
	private BigDecimal discount;

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

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

	@DbField("rup.sku_id")
	private Long skuId;

	@DbField("rup.upgrade_sku_ids")
	private String upgradeSkuIds;

	@DbIgnore
	private List<RenewSkuView> renewSkus;

	@Getter
	@Setter
	@SearchBean(tables = "goods_don_sku sku", where = "status is true")
	public static class RenewSkuView {
		@DbField("sku.id")
		private Long skuId;

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

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

		@DbField("sku.gpt_limit_num")
		private Integer gptLimitNum;

		@DbField("sku.gpt_limit_time")
		private Long gptLimitTime;

		/**
		 * 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.spec_val")
		private String specVal;

		@DbField("sku.price")
		private BigDecimal price;

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

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

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