init project
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/constants/transaction"
|
||||
"time"
|
||||
)
|
||||
|
||||
type Transaction struct {
|
||||
ID int64
|
||||
BranchID int64
|
||||
Status transaction.PaymentStatus
|
||||
Amount float64
|
||||
OrderID int64
|
||||
PaymentMethod transaction.PaymentMethod
|
||||
CustomerName string
|
||||
CustomerPhone string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
CreatedBy int64
|
||||
UpdatedBy int64
|
||||
}
|
||||
|
||||
type TransactionDB struct {
|
||||
Transaction
|
||||
}
|
||||
|
||||
func (b *Transaction) ToTransactionDB() *TransactionDB {
|
||||
return &TransactionDB{
|
||||
Transaction: *b,
|
||||
}
|
||||
}
|
||||
|
||||
func (TransactionDB) TableName() string {
|
||||
return "transactions"
|
||||
}
|
||||
Reference in New Issue
Block a user