Discover Packages
github.com/Shubhaankar-sharma/golang-blog-api
api
models
package
Version:
v0.0.0-...-80fd6f0
Opens a new window with list of versions in this module.
Published: Dec 24, 2020
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type ApiUser struct {
UId uint `gorm:"primary key" json:"uid"`
Email string `gorm:"type:varchar(100);unique_index" json:"email"`
Name string `gorm:"size:100;not null" json:"name"`
}
type Blog struct {
gorm .Model
Author ApiUser `gorm:"embedded"`
Title string `gorm:"type:varchar(1000);not null" json:"title"`
Body string `gorm:"size:1000;not null" json:"body"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.