Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Person ¶
type Person struct { ID int `gorm:"primary_key" json:"id"` Name string `gorm:"column:name;type:TEXT;NOT NULL" json:"name"` Surname string `gorm:"column:surname;type:TEXT;NOT NULL" json:"surname"` Patronymic null.String `gorm:"column:patronymic;type:TEXT" json:"patronymic,omitempty"` Age null.Int `gorm:"column:age;type:INT" json:"age,omitempty"` GenderID *int `json:"-"` Gender PersonGender `gorm:"foreignKey:GenderID;references:ID;constraint:OnUpdate:CASCADE,OnDelete:CASCADE" json:"gender,omitempty"` Country []PersonCountry `gorm:"constraint:OnUpdate:CASCADE,OnDelete:CASCADE" json:"country,omitempty"` }
func (*Person) MergeWithPatchRequest ¶
func (p *Person) MergeWithPatchRequest(req *requests.PatchPersonRequest)
type PersonCountry ¶
type PersonCountry struct { ID int `gorm:"primary_key" json:"id"` PersonID int `json:"-"` CountryID string `gorm:"column:country_id;type:TEXT;NOT NULL" json:"country_id"` Probability float32 `gorm:"column:probability;type:FLOAT;NOT NULL" json:"probability"` }
func (*PersonCountry) TableName ¶
func (p *PersonCountry) TableName() string
type PersonGender ¶
type PersonGender struct { ID int `gorm:"primary_key" json:"id"` Gender string `gorm:"column:gender;type:TEXT;NOT NULL" json:"gender"` Probability float32 `gorm:"column:probability;type:FLOAT;NOT NULL" json:"probability"` }
func (*PersonGender) TableName ¶
func (p *PersonGender) TableName() string
Click to show internal directories.
Click to hide internal directories.