示例#1
0
func (m *M) CreateUsersTable_1385792513_Up(hd *hood.Hood) {
	type Users struct {
		Id    hood.Id
		First string
		Last  string
	}
	hd.CreateTable(&Users{})
}
示例#2
0
func (m *M) CreatePostsTable_1385803004_Up(hd *hood.Hood) {
	type Posts struct {
		Id        hood.Id
		Title     string `validate:"presence len(2:255)" sql:"size(255)"`
		Body      string `validate:"presence"`
		AuthorId  int64
		CreatedAt hood.Created
		UpdatedAt hood.Updated
	}
	hd.CreateTable(&Posts{})
}