// src/types/Listing.ts

export interface Listing {
  id: number;
  categoryId: number;
  operationId: number;
  title: string;
  description: string;
  price: number;
  adFee: number;
  currency: string;
  createdAt: string;
  status: string;
  userId: number | null;
  clientId: number | null;
  categoryName?: string;
  mainImageUrl?: string;
  viewCount: number;
  origin: string;
  overlayStatus?: string | null;
  printDaysCount?: number;
  publicationStartDate?: string;
  approvedAt?: string;
}

export interface ListingAttribute {
  id: number;
  listingId: number;
  attributeDefinitionId: number;
  value: string;
  attributeName: string;
}

export interface ListingImage {
  id: number;
  listingId: number;
  url: string;
  isMainInfo: boolean;
  displayOrder: number;
}

export interface Payment {
  id: number;
  listingId: number;
  amount: number;
  paymentMethod: string;
  cardPlan?: string;
  surcharge: number;
  paymentDate: string;
  status: string;
}

export interface ListingDetail {
  listing: Listing;
  attributes: ListingAttribute[];
  images: ListingImage[];
  payments: Payment[];
}