feat(payment): connect payment service flow
This commit is contained in:
@@ -8,6 +8,8 @@ import {
|
||||
type PaymentOrderStatusResponseInput,
|
||||
} from "@/data/schemas/payment/payment_order_status_response";
|
||||
|
||||
export type { PaymentOrderStatus };
|
||||
|
||||
export class PaymentOrderStatusResponse {
|
||||
declare readonly orderId: string;
|
||||
declare readonly status: PaymentOrderStatus;
|
||||
|
||||
@@ -24,14 +24,10 @@ export class User {
|
||||
declare readonly avatarUrl: string;
|
||||
declare readonly loginProvider: string;
|
||||
declare readonly isGuest: boolean;
|
||||
/** 是否为 VIP 会员(Stripe webhook 更新) */
|
||||
/** 是否为 VIP 会员 */
|
||||
declare readonly isVip: boolean;
|
||||
/** 语音聊天剩余分钟数(Stripe webhook 更新) */
|
||||
/** 语音聊天剩余分钟数 */
|
||||
declare readonly voiceMinutesRemaining: number;
|
||||
/** Stripe Customer ID —— 首次 Checkout 完成后由 webhook 设置 */
|
||||
declare readonly stripeCustomerId: string | null;
|
||||
|
||||
|
||||
|
||||
private constructor(input: UserInput) {
|
||||
const data = UserSchema.parse(input);
|
||||
|
||||
@@ -17,7 +17,6 @@ export const UserViewSchema = z.object({
|
||||
isGuest: z.boolean(),
|
||||
isVip: z.boolean(),
|
||||
voiceMinutesRemaining: z.number(),
|
||||
stripeCustomerId: z.string().nullable(),
|
||||
});
|
||||
|
||||
export type UserView = z.infer<typeof UserViewSchema>;
|
||||
|
||||
Reference in New Issue
Block a user