Added transaction feature, fixed some mistakes
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user