import {TransactionKind, TransactionType} from "@/models/enums";
import {Category} from "@/models/category";
import {User} from "@/models/user";

export interface Transaction {
    id: number;
    parentId: number | null
    type: TransactionType
    kind: TransactionKind
    category: Category
    comment: string
    amount: number
    fees: number | null
    date: string
    isDone: boolean
    createdBy: User
    createdAt: Date
    updatedBy: User | null
    updatedAt: Date | number
}

export interface CreateTransactionDTO {
    type: TransactionType
    kind: TransactionKind
    categoryId: number
    comment: string
    amount: number
    fees: number | null
    date: string | Date
}

export interface UpdateTransactionDTO {
    type: TransactionType
    kind: TransactionKind
    categoryId: number
    comment: string
    amount: number
    fees: number | null
    isDone: boolean
    date: string | Date
}
