Mhamdans17 commited on
Commit ·
7cfb539
1
Parent(s): 24a5138
fix: remove testdb.go which caused build error due to multiple main functions
Browse files
testdb.go
DELETED
|
@@ -1,19 +0,0 @@
|
|
| 1 |
-
package main
|
| 2 |
-
|
| 3 |
-
import (
|
| 4 |
-
"fmt"
|
| 5 |
-
"service-warungpos-go/config"
|
| 6 |
-
"service-warungpos-go/models"
|
| 7 |
-
)
|
| 8 |
-
|
| 9 |
-
func main() {
|
| 10 |
-
config.LoadConfig()
|
| 11 |
-
config.ConnectDatabase()
|
| 12 |
-
|
| 13 |
-
var orders []models.Order
|
| 14 |
-
config.DB.Order("id desc").Limit(3).Find(&orders)
|
| 15 |
-
|
| 16 |
-
for _, o := range orders {
|
| 17 |
-
fmt.Printf("Order: %s | Total: %d | Fee: %d | PayMethod: %s\n", o.OrderNumber, o.TotalAmount, o.PlatformFee, o.PaymentMethod)
|
| 18 |
-
}
|
| 19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|