Exercise repo, getAllByCustomerId, unit test (+code inspection)

This commit is contained in:
Bossanyi Tibor
2020-05-11 21:26:44 +02:00
parent 7c23ec7fa4
commit a6627a31e7
10 changed files with 42 additions and 87 deletions
@@ -6,15 +6,16 @@ import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.GenerationType
import javax.persistence.Id
import javax.validation.constraints.Null
@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
@get: NonNull var exerciseTypeId: Long = 0,
@get: NonNull var customerId: Long = 0,
@get: NonNull var datetimeExercise: Date? = null,
@get: NonNull var quantity: Int = 0,
@get: Null var restTime: Integer, // in seconds
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
val exercise_id: Long = 0
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
val exerciseId: Long = 0
)