package
Version:
v0.0.0-...-35c4631
Opens a new window with list of versions in this module.
Published: Aug 21, 2023
License: MIT
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
¶
type Timestamp struct {
CreatedAt time.Time `gorm:"default:current_timestamp" json:"created_at"`
UpdatedAt time.Time `gorm:"default:current_timestamp" json:"updated_at"`
}
type Todo struct {
ID string `gorm:"primaryKey;index" json:"id"`
Title string `json:"title"`
Description string `json:"description"`
IsCompleted bool `gorm:"default:false" json:"is_completed"`
Timestamp
IsDeleted bool `gorm:"default:false" json:"is_deleted"`
UserID string `gorm:"index"`
}
type User struct {
UID string `gorm:"primaryKey;column:id;index" json:"id"`
Email string `gorm:"unique;index" json:"email"`
Password string `json:"password"`
Todos []Todo `gorm:"foreignKey:UserID"`
Timestamp
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.