Discover Packages
github.com/hojabri/backend
models
package
Version:
v0.0.0-...-e9d0f3f
Opens a new window with list of versions in this module.
Published: Mar 22, 2022
License: GPL-3.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Company struct {
gorm .Model
Name string `json:"name" gorm:"uniqueIndex"`
Description string `json:"description,omitempty"`
CategoryID *uint `json:"category_id,omitempty"`
Category *CompanyCategory `json:"category"`
Website string `json:"website,omitempty"`
}
type CompanyCategory struct {
gorm .Model
Name string `json:"name" gorm:"uniqueIndex"`
}
type Response struct {
Code int `json:"code,omitempty"`
Body interface{} `json:"body,omitempty"`
Title string `json:"title,omitempty"`
Message string `json:"message,omitempty"`
}
type User struct {
gorm .Model
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Email string `json:"email,omitempty" gorm:"uniqueIndex"`
Phone string `json:"phone,omitempty"`
CompanyID *uint `json:"company_id,omitempty"`
Company *Company `json:"company,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.