import type { TransferCategory, TransferCondition, TransferPricingSource } from '@prisma/client';

export interface CreateTransferItemInput {
  name: string;
  brand?: string;
  modelName?: string;
  category: TransferCategory;
  condition: TransferCondition;
  purchaseYear?: number;
  originalPriceVND?: bigint;
  askingPriceVND: bigint;
  quantity?: number;
  dimensions?: Record<string, unknown>;
  notes?: string;
}

export class CreateTransferListingCommand {
  constructor(
    public readonly sellerId: string,
    public readonly category: TransferCategory,
    public readonly title: string,
    public readonly description: string | null,
    public readonly address: string,
    public readonly ward: string | null,
    public readonly district: string,
    public readonly city: string,
    public readonly latitude: number,
    public readonly longitude: number,
    public readonly askingPriceVND: bigint,
    public readonly pricingSource: TransferPricingSource,
    public readonly isNegotiable: boolean,
    public readonly areaM2: number | null,
    public readonly monthlyRentVND: bigint | null,
    public readonly depositMonths: number | null,
    public readonly remainingLeaseMo: number | null,
    public readonly businessType: string | null,
    public readonly footTraffic: string | null,
    public readonly contactPhone: string | null,
    public readonly contactName: string | null,
    public readonly items: CreateTransferItemInput[],
  ) {}
}
