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.
37 lines
642 B
Go
37 lines
642 B
Go
package model
|
|
|
|
import (
|
|
"encoding/json"
|
|
"time"
|
|
)
|
|
|
|
type SignLog struct {
|
|
ID int
|
|
OrderNo string
|
|
PcInfo string
|
|
CaInfo string
|
|
FileInfo string
|
|
SignUrl string
|
|
Params string
|
|
IsUploadPdf int
|
|
CreatedAt time.Time
|
|
UpdatedAt time.Time `json:"-"`
|
|
}
|
|
|
|
func (SignLog) TableName() string {
|
|
return "sign_log"
|
|
}
|
|
|
|
func (a SignLog) MarshalJSON() ([]byte, error) {
|
|
type Alias SignLog
|
|
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),
|
|
})
|
|
}
|