package space.luminic.finance.dtos import space.luminic.finance.models.Transaction.TransactionKind import space.luminic.finance.models.Transaction.TransactionType import java.math.BigDecimal import java.time.LocalDate data class TransactionDTO( val id: Int? = null, var parentId: Int? = null, val type: TransactionType = TransactionType.EXPENSE, val kind: TransactionKind = TransactionKind.INSTANT, val category: CategoryDTO, val comment: String, val amount: BigDecimal, val fees: BigDecimal = BigDecimal.ZERO, val date: LocalDate, val isDone: Boolean, val createdBy: UserDTO, val updatedBy: UserDTO? = null, ) { data class CreateTransactionDTO( val type: TransactionType = TransactionType.EXPENSE, val kind: TransactionKind = TransactionKind.INSTANT, val categoryId: Int, val comment: String, val amount: BigDecimal, val fees: BigDecimal = BigDecimal.ZERO, val date: LocalDate, ) data class UpdateTransactionDTO( val type: TransactionType = TransactionType.EXPENSE, val kind: TransactionKind = TransactionKind.INSTANT, val categoryId: Int, val comment: String, val amount: BigDecimal, val fees: BigDecimal = BigDecimal.ZERO, val isDone: Boolean, val date: LocalDate ) }