Documentation ¶
Overview ¶
Code generated by "apigen"; DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶ added in v0.0.9
type Comment struct { ID int `json:"id"` QuestionID int `json:"question_id"` Comments []Comment `json:"comments" gorm:"many2many:comment_comments"` }
Test recursion
type Question ¶ added in v0.0.9
type Question struct { ID int `json:"id"` Comments []Comment `json:"comments" gorm:"many2many:question_comments"` }
apigen:skip
type Sex ¶
type Sex string
func (Sex) DatabaseType ¶
func (Sex) GormDataType ¶ added in v0.0.6
func (Sex) ValidValues ¶
type User ¶
type User struct { ID int `json:"id" gorm:"autoIncrement"` Name string `json:"name" gorm:"default:''"` Age int `json:"age"` Discount float64 `json:"discount" gorm:"constraint:positive_discount CHECK (discount > 0)"` RoleID int64 `json:"role_id" gorm:"not null"` Role Role `json:"role" gorm:"foreignKey:RoleID"` Tags []Tag `json:"tags" gorm:"many2many:user_tags"` }
Click to show internal directories.
Click to hide internal directories.