iris/_examples/database/orm/reform/models/person.go

14 lines
366 B
Go
Raw Normal View History

2020-08-01 02:46:51 +02:00
//go:generate reform
package models
import "time"
//reform:people
type Person struct {
ID int32 `reform:"id,pk" json:"id"`
Name string `reform:"name" json:"name"`
Email *string `reform:"email" json:"email"`
CreatedAt time.Time `reform:"created_at" json:"created_at"`
UpdatedAt *time.Time `reform:"updated_at" json:"updated_at"`
}