Refactor to use plain GoStyleCamelCase instead of json_style_snake_case.
This commit is contained in:
parent
931c493928
commit
051474bdc9
12 changed files with 60 additions and 61 deletions
|
|
@ -8,38 +8,38 @@ type Login struct {
|
|||
}
|
||||
|
||||
type User struct {
|
||||
Id int `db:"id" json:"id" validate:"numeric"`
|
||||
Id int `db:"id" `
|
||||
Username string `db:"username" validate:"required,max=30"`
|
||||
Email string `db:"email" validate:"required,email,max=128"`
|
||||
Password string `db:"password" validate:"required,min=8,max=64"`
|
||||
}
|
||||
|
||||
type Link struct {
|
||||
Id int `db:"id" json:"id" validate:"isdefault"`
|
||||
StreamId int `db:"stream_id" json:"stream_id" form:"stream_id" validate:"required,numeric"`
|
||||
Url string `db:"url" json:"url" form:"url" validate:"required,http_url,max=150"`
|
||||
Description string `db:"description" json:"description" form:"description" validate:"required,max=300"`
|
||||
Id int `db:"id" `
|
||||
StreamId int `db:"stream_id" `
|
||||
Url string `db:"url" `
|
||||
Description string `db:"description" `
|
||||
}
|
||||
|
||||
type Stream struct {
|
||||
Id int `db:"id" json:"id"`
|
||||
Title string `db:"title" json:"title"`
|
||||
Description string `db:"description" json:"description"`
|
||||
Id int `db:"id" `
|
||||
Title string `db:"title" `
|
||||
Description string `db:"description" `
|
||||
}
|
||||
|
||||
type Game struct {
|
||||
Id int `db:"id" json:"id"`
|
||||
Slug string `db:"slug" json:"slug"`
|
||||
Title string `db:"title" json:"title"`
|
||||
Description string `db:"description" json:"description"`
|
||||
Image string `db:"image" json:"image"`
|
||||
Url string `db:"url" json:"url"`
|
||||
Tags string `db:"tags" json:"tags"`
|
||||
Video string `db:"video" json:"video"`
|
||||
CurrentStatus string `db:"current_status" json:"current_status" form:"current_status"`
|
||||
PlannedWork string `db:"planned_work" json:"planned_work" form:"planned_work"`
|
||||
CodeUrl string `db:"code_url" json:"code_url" form:"code_url"`
|
||||
HeaderImage string `db:"header_image" json:"header_image" form:"header_image"`
|
||||
Id int `db:"id" `
|
||||
Slug string `db:"slug" `
|
||||
Title string `db:"title" `
|
||||
Description string `db:"description" `
|
||||
Image string `db:"image" `
|
||||
Url string `db:"url" `
|
||||
Tags string `db:"tags" `
|
||||
Video string `db:"video" `
|
||||
CurrentStatus string `db:"current_status" `
|
||||
PlannedWork string `db:"planned_work" `
|
||||
CodeUrl string `db:"code_url" `
|
||||
HeaderImage string `db:"header_image" `
|
||||
}
|
||||
|
||||
func Models() map[string]reflect.Type {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue