62 lines
1.0 KiB
Go
62 lines
1.0 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type Transaction struct {
|
|
ID int64
|
|
FamilyID int64
|
|
Description *string
|
|
Type string
|
|
DateTime time.Time
|
|
Category string
|
|
Amount float64
|
|
CreatedAt time.Time
|
|
CreatedBy int64
|
|
ReceiptID *int64
|
|
}
|
|
|
|
type CreateTransactionRequest struct {
|
|
FamilyID int64
|
|
Description *string
|
|
Type string
|
|
DateTime time.Time
|
|
Category string
|
|
Amount float64
|
|
CreatedBy int64
|
|
ReceiptID *int64
|
|
}
|
|
|
|
type UpdateTransactionRequest struct {
|
|
Description *string
|
|
Type *string
|
|
DateTime *time.Time
|
|
Category *string
|
|
Amount *float64
|
|
ReceiptID *int64
|
|
DetachReceipt bool
|
|
}
|
|
|
|
type TransactionListFilter struct {
|
|
FamilyID *int64
|
|
CreatedBy *int64
|
|
Type *string
|
|
Category *string
|
|
DateFrom *time.Time
|
|
DateTo *time.Time
|
|
Limit int
|
|
Offset int
|
|
}
|
|
|
|
type TransactionAnalyticsFilter struct {
|
|
FamilyID *int64
|
|
Type *string
|
|
DateFrom time.Time
|
|
DateTo time.Time
|
|
}
|
|
|
|
type TransactionAnalytics struct {
|
|
Expenses float64
|
|
Incomes float64
|
|
Total float64
|
|
}
|