Update Format
This commit is contained in:
parent
dc2df93572
commit
d458f0649d
@ -20,7 +20,7 @@ type Database struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c Database) DSN() string {
|
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 {
|
func (c Database) ConnectionMaxLifetime() time.Duration {
|
||||||
|
|||||||
@ -276,13 +276,13 @@ func (h *Handler) toHistoryOrderResponse(resp *entity.HistoryOrder) response.His
|
|||||||
ID: resp.ID,
|
ID: resp.ID,
|
||||||
Employee: resp.Employee,
|
Employee: resp.Employee,
|
||||||
Site: resp.Site,
|
Site: resp.Site,
|
||||||
Timestamp: resp.Timestamp.Format(time.RFC3339),
|
Timestamp: resp.Timestamp.Format("2006-01-02 15:04:05"),
|
||||||
BookingTime: resp.BookingTime.Format(time.RFC3339),
|
BookingTime: resp.BookingTime.Format("2006-01-02 15:04:05"),
|
||||||
Tickets: resp.Tickets,
|
Tickets: resp.Tickets,
|
||||||
PaymentType: resp.PaymentType,
|
PaymentType: resp.PaymentType,
|
||||||
Status: resp.Status,
|
Status: resp.Status,
|
||||||
Amount: resp.Amount,
|
Amount: resp.Amount,
|
||||||
VisitDate: resp.VisitDate.Format(time.RFC3339),
|
VisitDate: resp.VisitDate.Format("2006-01-02"),
|
||||||
TicketStatus: resp.TicketStatus,
|
TicketStatus: resp.TicketStatus,
|
||||||
Source: resp.Source,
|
Source: resp.Source,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,7 +101,7 @@ func (h *TransactionHandler) ToTransactionListResponse(transactions []*entity.Tr
|
|||||||
ID: transaction.ID,
|
ID: transaction.ID,
|
||||||
TransactionType: transaction.TransactionType,
|
TransactionType: transaction.TransactionType,
|
||||||
Status: transaction.Status,
|
Status: transaction.Status,
|
||||||
CreatedAt: transaction.CreatedAt,
|
CreatedAt: transaction.CreatedAt.Format("2006-01-02 15:04:05"),
|
||||||
SiteName: transaction.SiteName,
|
SiteName: transaction.SiteName,
|
||||||
Amount: transaction.Amount,
|
Amount: transaction.Amount,
|
||||||
PartnerName: transaction.PartnerName,
|
PartnerName: transaction.PartnerName,
|
||||||
|
|||||||
@ -1,17 +1,15 @@
|
|||||||
package response
|
package response
|
||||||
|
|
||||||
import "time"
|
|
||||||
|
|
||||||
type TransactionListItem struct {
|
type TransactionListItem struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
TransactionType string `json:"transaction_type"`
|
TransactionType string `json:"transaction_type"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
CreatedAt time.Time `json:"created_at"`
|
CreatedAt string `json:"created_at"`
|
||||||
SiteName string `json:"site_name"`
|
SiteName string `json:"site_name"`
|
||||||
Amount int64 `json:"amount"`
|
Amount int64 `json:"amount"`
|
||||||
PartnerName string `json:"partner_name"`
|
PartnerName string `json:"partner_name"`
|
||||||
Total int64 `json:"total"`
|
Total int64 `json:"total"`
|
||||||
Fee int64 `json:"fee"`
|
Fee int64 `json:"fee"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type TransactionListResponse struct {
|
type TransactionListResponse struct {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user