Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Link ¶
type Link struct { gorm.Model LongUrl string `json:"longurl" gorm:"not null"` ShortUrl string `json:"shorturl" gorm:"type:varchar(75);not null"` Keyword string `json:"-" gorm:"type:varchar(75);not null"` ViewCount int `json:"view_count" gorm:"not null;default:0"` UserID string `json:"-" gorm:"type:varchar(75);not null;index"` }
type User ¶
type User struct { gorm.Model ID uuid.UUID `json:"id" gorm:"type:varchar(50);primary_key;default:(UUID())"` Email string `json:"email" gorm:"type:varchar(150);index;unique;not null" form:"email" binding:"required"` IsActive bool `json:"is_active" gorm:"not null;default:false"` Password string `json:"-" gorm:"type:varchar(150);not null" form:"password" binding:"required"` Links []Link `json:"links" gorm:"ForeignKey:UserID"` }
Click to show internal directories.
Click to hide internal directories.