models

package
v0.0.0-...-e9d0f3f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Company

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

type CompanyCategory struct {
	gorm.Model
	Name string `json:"name" gorm:"uniqueIndex"`
}

type Response

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

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL