init project

This commit is contained in:
aditya.siregar
2024-05-28 14:14:55 +07:00
commit 67f1dbc850
141 changed files with 16879 additions and 0 deletions
+35
View File
@@ -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"
}