import { Maybe } from '@/core';
import { IEnumTranslate } from './enum_translate.type';

export interface IConsumerRawResponse {
  id: string;
  created_at: string;
  name: string;
  type: IEnumTranslate;
  status: IEnumTranslate;
  partner: {
    id: string;
    name: string;
    code: string;
  };
  individual?: Maybe<IConsumerIndividual>;
  legal?: Maybe<IConsumerLegal>;
}
export interface IConsumerResponse extends IConsumerRawResponse {}

export interface IConsumerRequest {
  type?: 'INDIVIDUAL' | 'LEGAL';
  username?: string;
  password?: string;
  status?: string;
  customer?: {
    individual?: IConsumerIndividual;
    legal?: IConsumerLegal;
  };
}

interface IConsumerIndividual {
  first_name: string;
  last_name: string;
  mobile_number: string;
  national_code?: string;
}

interface IConsumerLegal {
  name: string;
  registration_code?: string;
}
