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.

41 lines
733 B
Go

4 months ago
package model
import (
"encoding/json"
"time"
)
type Revoke struct {
ID int
PolicyNo string
BankName string
AccountName string
ContactName string
ContactPhone string
FileList string
BankCardNum string
BackPremium string
Reason string
Status string
Msg string
CreatedAt time.Time
UpdatedAt time.Time `json:"-"`
}
func (Revoke) TableName() string {
return "revoke"
}
func (a Revoke) MarshalJSON() ([]byte, error) {
type Alias Revoke
return json.Marshal(&struct {
CreatedAt string
UpdatedAt string
*Alias
}{
CreatedAt: a.CreatedAt.Format("2006-01-02 15:04:05"),
UpdatedAt: a.UpdatedAt.Format("2006-01-02 15:04:05"),
Alias: (*Alias)(&a),
})
}