Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppPassword ¶ added in v0.2.0
type AppPassword struct { ID uuid.UUID `gorm:"primaryKey;type:uuid" json:"id,omitempty"` Description string `json:"description,omitempty"` Secret string `json:"secret,omitempty"` UserID uint `gorm:"index" json:"user_id,omitempty"` User *User `gorm:"foreignKey:UserID" json:"user,omitempty"` LastUsedAt time.Time `json:"last_used_at,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at,omitempty"` }
func (*AppPassword) BeforeCreate ¶ added in v0.2.0
func (ap *AppPassword) BeforeCreate(scope *gorm.DB) error
type Hobbit ¶
type Hobbit struct { ID uint `gorm:"primaryKey,autoIncrement" json:"id"` UserID uint `json:"-"` User User `gorm:"foreignKey:UserID" json:"user,omitempty"` Name string `json:"name,omitempty"` Image string `json:"image,omitempty"` Description string `json:"description,omitempty"` Records []NumericRecord `gorm:"foreignKey:HobbitID" json:"records,omitempty"` }
type NumericRecord ¶
type NumericRecord struct { ID uint `gorm:"primaryKey,autoIncrement" json:"id"` Timestamp time.Time `gorm:"autoCreateTime" json:"timestamp"` HobbitID uint `json:"hobbit_id,omitempty"` Hobbit Hobbit `gorm:"foreignKey:HobbitID" json:"hobbit,omitempty"` Value int64 `json:"value,omitempty"` Comment string `json:"comment,omitempty"` }
Click to show internal directories.
Click to hide internal directories.