You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
739 B
Go

package model
import (
"encoding/json"
"time"
)
type UserBankCard struct {
ID int
UserID int
Mobile string
AccountName string
AccountNo string
IdCardNo string
AgreeID string
BankCode string
BankName string
Status int
ErrorMessage string
CreatedAt time.Time
UpdatedAt time.Time `json:"-"`
}
func (UserBankCard) TableName() string {
return "user_bank_cards"
}
func (c UserBankCard) MarshalJSON() ([]byte, error) {
type Alias UserBankCard
return json.Marshal(&struct {
CreatedAt string
UpdatedAt string
*Alias
}{
CreatedAt: c.CreatedAt.Format("2006-01-02 15:04:05"),
UpdatedAt: c.UpdatedAt.Format("2006-01-02 15:04:05"),
Alias: (*Alias)(&c),
})
}