// Auto-generated types for SocialApp

// ─── Base ───────────────────────────────────────────


// ─── Base ───────────────────────────────────────────
export interface User {
  id: string;
  phone: string;
  nickname: string;
  avatarUrl: string;
  createdAt: string;
  updatedAt: string;
}
export interface Contract {
  id?: string;
  userId: string;
  title: string;
  partyA?: string;
  partyB?: string;
  amount?: number;
  signedAt?: string;
  expiresAt?: string;
  status?: string;
  fileUrl?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface Approval {
  id?: string;
  userId: string;
  entityType: string;
  entityId?: string;
  applicantId: string;
  status?: string;
  formData?: Record<string, unknown>;
  createdAt?: string;
  updatedAt?: string;
}

export interface Customer {
  id?: string;
  userId: string;
  name: string;
  email?: string;
  phone?: string;
  company?: string;
  source?: string;
  tags?: Record<string, unknown>;
  createdAt?: string;
  updatedAt?: string;
}

export interface Reminder {
  id?: string;
  userId: string;
  entityType: string;
  entityId?: string;
  remindAt: string;
  message?: string;
  sent?: boolean;
  createdAt?: string;
  updatedAt?: string;
}

export interface Articles {
  id: string;
  userId?: string;
  title: string;
  content?: string;
  excerpt?: string;
  coverUrl?: string;
  status?: string;
  authorId?: string;
  category?: string;
  publishedAt?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface Tags {
  id: string;
  userId?: string;
  name: string;
  color?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface Comments {
  id: string;
  userId?: string;
  entityType: string;
  entityId: string;
  content: string;
  parentId?: string;
  createdAt?: string;
  updatedAt?: string;
}

export interface Media {
  id: string;
  userId?: string;
  filename: string;
  url: string;
  mimeType?: string;
  sizeBytes?: number;
  createdAt?: string;
  updatedAt?: string;
}


// ─── API Responses ──────────────────────────────────
export interface ApiResponse<T> {
  data: T;
  message: string;
}

export interface PaginatedResponse<T> extends ApiResponse<T[]> {
  total: number;
  page: number;
  pageSize: number;
}

export interface ApiError {
  code: string;
  message: string;
  details?: Record<string, string[]>;
}