Update Format
This commit is contained in:
parent
dc2df93572
commit
d458f0649d
@ -20,7 +20,7 @@ type Database struct {
|
||||
}
|
||||
|
||||
func (c Database) DSN() string {
|
||||
return fmt.Sprintf("host=%s port=%s dbname=%s user=%s password=%s sslmode=%s", c.Host, c.Port, c.DB, c.Username, c.Password, c.SslMode)
|
||||
return fmt.Sprintf("host=%s port=%s dbname=%s user=%s password=%s sslmode=%s TimeZone=UTC", c.Host, c.Port, c.DB, c.Username, c.Password, c.SslMode)
|
||||
}
|
||||
|
||||
func (c Database) ConnectionMaxLifetime() time.Duration {
|
||||
|
||||
@ -276,13 +276,13 @@ func (h *Handler) toHistoryOrderResponse(resp *entity.HistoryOrder) response.His
|
||||
ID: resp.ID,
|
||||
Employee: resp.Employee,
|
||||
Site: resp.Site,
|
||||
Timestamp: resp.Timestamp.Format(time.RFC3339),
|
||||
BookingTime: resp.BookingTime.Format(time.RFC3339),
|
||||
Timestamp: resp.Timestamp.Format("2006-01-02 15:04:05"),
|
||||
BookingTime: resp.BookingTime.Format("2006-01-02 15:04:05"),
|
||||
Tickets: resp.Tickets,
|
||||
PaymentType: resp.PaymentType,
|
||||
Status: resp.Status,
|
||||
Amount: resp.Amount,
|
||||
VisitDate: resp.VisitDate.Format(time.RFC3339),
|
||||
VisitDate: resp.VisitDate.Format("2006-01-02"),
|
||||
TicketStatus: resp.TicketStatus,
|
||||
Source: resp.Source,
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ func (h *TransactionHandler) ToTransactionListResponse(transactions []*entity.Tr
|
||||
ID: transaction.ID,
|
||||
TransactionType: transaction.TransactionType,
|
||||
Status: transaction.Status,
|
||||
CreatedAt: transaction.CreatedAt,
|
||||
CreatedAt: transaction.CreatedAt.Format("2006-01-02 15:04:05"),
|
||||
SiteName: transaction.SiteName,
|
||||
Amount: transaction.Amount,
|
||||
PartnerName: transaction.PartnerName,
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
package response
|
||||
|
||||
import "time"
|
||||
|
||||
type TransactionListItem struct {
|
||||
ID string `json:"id"`
|
||||
TransactionType string `json:"transaction_type"`
|
||||
Status string `json:"status"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
CreatedAt string `json:"created_at"`
|
||||
SiteName string `json:"site_name"`
|
||||
Amount int64 `json:"amount"`
|
||||
PartnerName string `json:"partner_name"`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user