Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Categories ¶
type Categories []*Category
type Category ¶
type Category struct {
// category
Category string `gorm:"not null; unique" json:"category,omitempty"`
// id
ID int64 `gorm:"primary_key;AUTO_INCEMENT;not null" json:"id,omitempty"`
}
func (*Category) MarshalBinary ¶
MarshalBinary interface implementation
func (*Category) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Descriptor ¶
type Descriptor struct {
// descriptor
Descriptor string `json:"descriptor,omitempty"`
// detail Id
DetailID int64 `gorm:"foreignkey:DetailID;not null" json:"detailID,omitempty"`
// id
ID int64 `gorm:"primary_key;auto_incement" json:"id,omitempty"`
}
func (*Descriptor) MarshalBinary ¶
func (m *Descriptor) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Descriptor) UnmarshalBinary ¶
func (m *Descriptor) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Descriptors ¶
type Descriptors []*Descriptor
type Detail ¶
type Detail struct {
// detail
Detail string `gorm:"not null; unique" json:"detail,omitempty"`
// id
ID int64 `gorm:"primary_key;auto_incement;not null" json:"id,omitempty"`
}
func (*Detail) MarshalBinary ¶
MarshalBinary interface implementation
func (*Detail) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Item ¶
type Item struct {
// descriptions
Descriptions []Descriptor `json:"descriptions"`
// id
ID int64 `json:"id,omitempty"`
// name
Name string `json:"name,omitempty"`
// sub category ID
SubCategoryID int64 `json:"subCategoryID,omitempty"`
// user ID
UserID int64 `json:"userID,omitempty"`
}
func (*Item) MarshalBinary ¶
MarshalBinary interface implementation
func (*Item) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type SubCategories ¶
type SubCategories []*SubCategory
type SubCategory ¶
type SubCategory struct {
// id
ID int64 `gorm:"primary_key;auto_incement;not null" json:"id,omitempty"`
// subcategory
Subcategory string `gorm:"unique; not null" json:"subcategory,omitempty"`
//Category Foreign Key
CategoryID int64 `gorm:"foreignkey:CategoryID;not null" json:"categoryID,omitempty"`
}
func (*SubCategory) MarshalBinary ¶
func (m *SubCategory) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*SubCategory) UnmarshalBinary ¶
func (m *SubCategory) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type User ¶
type User struct {
// id
ID int64 `json:"id,omitempty"`
// username
Username string `json:"username,omitempty"`
// first name
FirstName string `json:"firstName,omitempty"`
// last name
LastName string `json:"lastName,omitempty"`
// email
Email string `json:"email,omitempty"`
}
func (*User) MarshalBinary ¶
MarshalBinary interface implementation
func (*User) UnmarshalBinary ¶
UnmarshalBinary interface implementation
Click to show internal directories.
Click to hide internal directories.