models

package
v0.0.0-...-8381596 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exercise

type Exercise struct {
	gorm.Model
	UserID        uuid.UUID
	Name          string
	MuscleGroupID uint64
	MuscleGroup   MuscleGroup
}

type ExerciseHistory

type ExerciseHistory struct {
	gorm.Model
	UserID      uuid.UUID
	ExerciseID  uint
	Exercise    Exercise
	Repetitions int
	Weight      int
	LogID       uint
	Log         Log
}

type Log

type Log struct {
	gorm.Model
	UserID            uuid.UUID
	Name              string
	ExerciseHistories []ExerciseHistory
	Notes             string
}

type MuscleGroup

type MuscleGroup struct {
	gorm.Model
	UserID uuid.UUID `gorm:"uniqueIndex:user_id_name"`
	Name   string    `gorm:"uniqueIndex:user_id_name"`
}

type User

type User struct {
	gorm.Model
	ID       uuid.UUID `gorm:"type:uuid;default:uuid_generate_v4();primary_key"`
	Email    string    `gorm:"uniqueIndex;not null"`
	Name     string    `gorm:"type:varchar(255);not null"`
	Password string    `gorm:"not null"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL