import {Transaction} from "@/models/transaction";
import {User} from "@/models/user";
import {TargetType} from "@/models/enums";

export interface Target {
    id: number,
    type: TargetType,
    name: string,
    description: string | null,
    amount: number,
    currentAmount: number,
    date: Date | string,
    components: TargetComponent[],
    transactions: Transaction[],
    createdBy: User,
    createdAt: Date,
    updatedBy: User | null,
    updatedAt: Date | null,
}


export interface CreateTargetDTO {
    type: TargetType,
    name: string,
    description: string | null,
    amount: number,
    date: Date | string,
}

export interface UpdateTargetDTO {
    type: TargetType,
    name: string,
    description: string | null,
    amount: number,
    date: Date | string,
}


export interface TargetComponent {
    id: number,
    name: string,
    amount: number,
    isDone: boolean,
    date: Date | string,
}


export interface CreateTargetComponent {
    name: string,
    amount: number,
    date: Date | string,
}

export interface UpdateTargetComponent {
    name: string,
    amount: number,
    isDone: boolean,
    date: Date | string,
}




