refactor(data): merge DTO models into schemas

This commit is contained in:
2026-07-17 12:47:18 +08:00
parent 2796010971
commit eac3d8f0a7
274 changed files with 1466 additions and 1956 deletions
@@ -1,6 +1,6 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { PaymentPlan } from "@/data/dto/payment";
import { PaymentPlan } from "@/data/schemas/payment";
import {
behaviorAnalytics,
+1 -1
View File
@@ -1,6 +1,6 @@
"use client";
import type { PayChannel, PaymentPlan } from "@/data/dto/payment";
import type { PayChannel, PaymentPlan } from "@/data/schemas/payment";
import type {
PaymentAnalyticsContext,
+1 -1
View File
@@ -1,7 +1,7 @@
import { describe, expect, it, vi } from "vitest";
import type { IAuthStorage } from "@/data/storage/auth";
import { LoginStatus } from "@/data/dto/auth";
import { LoginStatus } from "@/data/schemas/auth";
import { Result } from "@/utils/result";
import { hasCompleteBusinessAuthSession } from "../auth_session";
+1 -1
View File
@@ -1,6 +1,6 @@
"use client";
import type { ChatMediaKind } from "@/data/dto/chat";
import type { ChatMediaKind } from "@/data/schemas/chat";
import { loadChatRepository } from "@/data/repositories/chat_repository_loader";
import { Result, type Result as ResultT } from "@/utils/result";
+1 -1
View File
@@ -2,7 +2,7 @@
import { useEffect, useRef, useState } from "react";
import type { ChatMediaKind } from "@/data/dto/chat";
import type { ChatMediaKind } from "@/data/schemas/chat";
import { BrowserDetector } from "@/utils/browser-detect";
import { Logger } from "@/utils/logger";
import { PlatformDetector } from "@/utils/platform-detect";
+1 -1
View File
@@ -1,7 +1,7 @@
import type {
FeedbackSubmitResponse,
SubmitFeedbackInput,
} from "@/data/dto/feedback";
} from "@/data/schemas/feedback";
import { getFeedbackRepository } from "@/data/repositories/feedback_repository";
import type { Result } from "@/utils/result";
+1 -1
View File
@@ -3,7 +3,7 @@
import { AuthStorage } from "@/data/storage/auth/auth_storage";
import { UserStorage } from "@/data/storage/user/user_storage";
import type { PendingChatPromotionType } from "@/data/storage/navigation";
import type { LoginStatus } from "@/data/dto/auth";
import type { LoginStatus } from "@/data/schemas/auth";
import { ROUTES } from "@/router/routes";
export type ExternalEntryTarget =
+1 -1
View File
@@ -1,4 +1,4 @@
import type { PayChannel } from "@/data/dto/payment";
import type { PayChannel } from "@/data/schemas/payment";
export function getDefaultPayChannelForCountryCode(
countryCode: string | null | undefined,
+1 -1
View File
@@ -1,4 +1,4 @@
import type { PayChannel } from "@/data/dto/payment";
import type { PayChannel } from "@/data/schemas/payment";
import type { AppSubscriptionReturnTo } from "@/router/navigation-types";
export type PaymentSearchParamValue = string | string[] | undefined;
+1 -1
View File
@@ -1,4 +1,4 @@
import type { PrivateAlbum } from "@/data/dto/private-room";
import type { PrivateAlbum } from "@/data/schemas/private-room";
export function isPrivateAlbumLocked(album: PrivateAlbum): boolean {
return album.locked || !album.unlocked || album.lockDetail.locked;