/**
 * 支付套餐
 */
import { z } from "zod";

import {
  booleanOrFalse,
  numberOrNull,
  stringOrNull,
} from "../nullable-defaults";

export const PaymentPlanSchema = z.object({
  planId: z.string(),
  planName: z.string(),
  orderType: z.string(),
  vipDays: numberOrNull,
  dolAmount: numberOrNull,
  creditBalance: z.number(),
  amountCents: z.number(),
  originalAmountCents: numberOrNull,
  dailyPriceCents: numberOrNull,
  currency: z.string(),
  isFirstRechargeOffer: booleanOrFalse,
  firstRechargeDiscountPercent: numberOrNull,
  promotionType: stringOrNull,
});

export type PaymentPlanInput = z.input<typeof PaymentPlanSchema>;
export type PaymentPlanData = z.output<typeof PaymentPlanSchema>;
