import { FleioId, IBaseFleioObjectModel } from '../../base-model/base-fleio-object.model';
import { IUsageDetails } from './usage-details';
import { ICurrencyModel } from './currency.model';

export interface ITaxDetails {
  name: string;
  amount: number;
  percent: number;
}

export interface IServiceDynamicUsageModel extends IBaseFleioObjectModel {
  price_taxes: ITaxDetails[];
  standard_price_taxes: ITaxDetails[];
  total_cycle_price: number;
  standard_cycle_price: number;
  price_override: boolean;
  price_override_model: string;
  service_id: number;
  client_display?: string;
  usage: {
    project: string;
    usage_details: IUsageDetails[];
    usage_end?: Date;
    metrics_details?: any[];
    metrics_details_summary?: any[];
    metrics_total_price?: number;
    price: number;
    currency: ICurrencyModel;
  };
  service_display?: string;
  price: number;
  client_currency: ICurrencyModel;
  updated_at?: Date;
  billing_start?: Date;
  billing_end?: Date;
  previous_history?: FleioId;
  next_history?: FleioId;
  start_date?: Date;
  end_date?: Date;
  start_display: string;
  end_display: string;
  service_cycle?: number;
}
