import { IClientAccountMovement } from "./ClientAccountMovements.model";

export type FindClientAccountsParams = {
    clientId: string;
    sessionUser: string;
};

export type CreateClientAccountParams = {
    clientId: string;
    amount: number;
    sessionUser: string;
};

export type DeleteClientAccountParams = {
    clientId: string;
    sessionUser: string;
};

export type ClientAccountReportItem = {
    date: Date;
    description: string;
    credit: number;
    debit: number;
    balance: number;
};

export type ClientAccountReport = {
    organizacionName: string;
    organizationId: string;
    clientId: string;
    clientName: string;
    balance: number;
    dateFrom: Date;
    dateTo: Date;
    data: ClientAccountReportItem[];
};

export type GetClientAccountReportParams = {
    clientId: string;
    dateFrom: Date;
    dateTo: Date;
    sessionUser: string;
};

export interface ClientAccountView {
    id: string;
    clientId: string;
    amount: number;
    lastMovements: IClientAccountMovement[];
}

export interface IClientAccount {
    id?: string;
    clientId: string;
    amount: number;
}
