init
This commit is contained in:
@@ -1,52 +1,43 @@
|
||||
package space.luminic.finance.dtos
|
||||
|
||||
import space.luminic.finance.models.Account
|
||||
import space.luminic.finance.models.Category
|
||||
import space.luminic.finance.models.Transaction.TransactionKind
|
||||
import space.luminic.finance.models.Transaction.TransactionType
|
||||
import space.luminic.finance.models.User
|
||||
import java.math.BigDecimal
|
||||
import java.time.Instant
|
||||
import java.time.LocalDate
|
||||
|
||||
|
||||
data class TransactionDTO(
|
||||
val id: String? = null,
|
||||
var parentId: String? = null,
|
||||
val id: Int? = null,
|
||||
var parentId: Int? = null,
|
||||
val type: TransactionType = TransactionType.EXPENSE,
|
||||
val kind: TransactionKind = TransactionKind.INSTANT,
|
||||
val categoryId: String,
|
||||
val category: CategoryDTO? = null,
|
||||
val category: CategoryDTO,
|
||||
val comment: String,
|
||||
val amount: BigDecimal,
|
||||
val fees: BigDecimal = BigDecimal.ZERO,
|
||||
val fromAccount: AccountDTO? = null,
|
||||
val toAccount: AccountDTO? = null,
|
||||
val date: Instant,
|
||||
val createdBy: String? = null,
|
||||
val updatedBy: String? = null,
|
||||
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: String,
|
||||
val categoryId: Int,
|
||||
val comment: String,
|
||||
val amount: BigDecimal,
|
||||
val fees: BigDecimal = BigDecimal.ZERO,
|
||||
val fromAccountId: String,
|
||||
val toAccountId: String? = null,
|
||||
val date: Instant
|
||||
val date: LocalDate,
|
||||
)
|
||||
|
||||
data class UpdateTransactionDTO(
|
||||
val id: String,
|
||||
val type: TransactionType = TransactionType.EXPENSE,
|
||||
val kind: TransactionKind = TransactionKind.INSTANT,
|
||||
val category: String,
|
||||
val categoryId: Int,
|
||||
val comment: String,
|
||||
val amount: BigDecimal,
|
||||
val fees: BigDecimal = BigDecimal.ZERO,
|
||||
val fromAccountId: String,
|
||||
val toAccountId: String? = null,
|
||||
val date: Instant
|
||||
val isDone: Boolean,
|
||||
val date: LocalDate
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user