export interface Company {
  id: string;
  tenantId: string;
  name: string;
  legalName?: string;
  taxId?: string;
  currencyId?: string;
  currencyCode?: string;
  parentCompanyId?: string | null;
  parentCompanyName?: string | null;
  partnerId?: string | null;
  settings?: CompanySettings;
  createdAt: string;
  createdBy?: string | null;
  updatedAt?: string | null;
  updatedBy?: string | null;
  deletedAt?: string | null;
  deletedBy?: string | null;
}

export interface CompanySettings {
  email?: string;
  phone?: string;
  website?: string;
  taxRegime?: string;
  fiscalPosition?: string;
  address?: string;
  city?: string;
  state?: string;
  country?: string;
  zipCode?: string;
}

export interface CreateCompanyDto {
  name: string;
  legalName?: string;
  taxId?: string;
  currencyId?: string;
  parentCompanyId?: string;
  settings?: CompanySettings;
}

export interface UpdateCompanyDto {
  name?: string;
  legalName?: string;
  taxId?: string;
  currencyId?: string;
  parentCompanyId?: string | null;
  settings?: CompanySettings;
}

export interface CompanyFilters {
  search?: string;
  parentCompanyId?: string;
  page?: number;
  limit?: number;
  sortBy?: string;
  sortOrder?: 'asc' | 'desc';
}

export interface CompaniesResponse {
  data: Company[];
  meta: {
    total: number;
    page: number;
    limit: number;
    totalPages: number;
  };
}
