Exercise Data class, repo, controller

This commit is contained in:
Bossanyi Tibor
2020-05-11 16:42:52 +02:00
committed by Bossanyi Tibor
parent 6bfbdd2b59
commit 7c23ec7fa4
13 changed files with 125 additions and 16 deletions
@@ -0,0 +1,20 @@
package com.aitrainer.api.model
import org.springframework.lang.NonNull
import java.sql.Date
import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.GenerationType
import javax.persistence.Id
@Entity
data class Exercises (
@get: NonNull var exercise_type_id: Long = 0,
@get: NonNull var customer_id: Long = 0,
@get: NonNull var dateTimeExercise: Date? = null,
@get: NonNull var quantity: Int = 0,
var restTime: Int = 0, // in seconds
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
val exercise_id: Long = 0
)