API 1.0.24 ExerciseAbility, AppPackage, AppCustomerPackage, Tracking

This commit is contained in:
Bossanyi Tibor
2021-02-05 07:29:39 +01:00
parent 6808720577
commit 0ab6d5142e
46 changed files with 794 additions and 170 deletions
@@ -1,28 +1,29 @@
package com.aitrainer.api.model
import com.google.gson.annotations.Expose
import javax.persistence.*
@Entity
data class Customer (
var name: String = "",
var firstname: String = "",
var email: String = "",
var age: Int? = 0,
var sex: String = "m",
var active: String = "N",
var dateAdd: String? = null,
var dateChange: String? = null,
var dataPolicyAllowed: Int = 0,
var admin: Int = 0,
var trainer: Int = 0,
var trainerId: Long = 0,
var password: String? = "",
var birthYear:Int = 0,
var goal: String? = null,
var fitnessLevel: String = "beginner",
var bodyType: String? = null,
var firebaseUid: String? = null,
@Expose var name: String = "",
@Expose var firstname: String = "",
@Expose var email: String = "",
@Expose var age: Int? = 0,
@Expose var sex: String = "m",
@Expose var active: String = "N",
@Expose var dateAdd: String? = null,
@Expose var dateChange: String? = null,
@Expose var dataPolicyAllowed: Int = 0,
@Expose var admin: Int = 0,
@Expose var trainer: Int = 0,
@Expose var trainerId: Long = 0,
@Expose var password: String? = "",
@Expose var birthYear:Int = 0,
@Expose var goal: String? = null,
@Expose var fitnessLevel: String = "beginner",
@Expose var bodyType: String? = null,
@Expose var firebaseUid: String? = null,
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
var customerId: Long = 0
@Expose var customerId: Long = 0
)
@@ -1,6 +1,7 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import org.hibernate.annotations.Fetch
import org.hibernate.annotations.FetchMode
import javax.persistence.*
@@ -8,13 +9,11 @@ import javax.validation.constraints.NotNull
@Entity
data class CustomerExerciseDevice (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
var customerExerciseDeviceId: Long = 0,
@get: NotNull var exerciseDeviceId: Long?,
@get: NotNull var customerId: Long?,
@get: NotNull var favourite: Boolean?,
@get: NotNull var dateAdd: String? = null
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) var customerExerciseDeviceId: Long = 0,
@Expose @get: NotNull var exerciseDeviceId: Long?,
@Expose @get: NotNull var customerId: Long?,
@Expose @get: NotNull var favourite: Boolean?,
@Expose @get: NotNull var dateAdd: String? = null
)
@@ -1,5 +1,6 @@
package com.aitrainer.api.model
import com.google.gson.annotations.Expose
import org.springframework.lang.NonNull
import javax.persistence.Entity
import javax.persistence.GeneratedValue
@@ -8,9 +9,9 @@ import javax.persistence.Id
@Entity
data class CustomerProperty (
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var customerPropertyId: Long = 0,
@get: NonNull var customerId: Long = 0,
@get: NonNull var propertyId: Long = 0,
@get: NonNull var propertyValue: Double? = null,
@get: NonNull var dateAdd: String? = null
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var customerPropertyId: Long = 0,
@Expose @get: NonNull var customerId: Long = 0,
@Expose @get: NonNull var propertyId: Long = 0,
@Expose @get: NonNull var propertyValue: Double? = null,
@Expose @get: NonNull var dateAdd: String? = null
)
@@ -0,0 +1,14 @@
package com.aitrainer.api.model
import com.google.gson.annotations.Expose
import javax.persistence.*
import javax.validation.constraints.NotBlank
@Entity
data class ExerciseAbility (
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val exerciseAbilityId: Long = 0,
@Expose @get: NotBlank var name: String = "",
@Expose @get: NotBlank var description: String = "",
)
@@ -1,5 +1,6 @@
package com.aitrainer.api.model
import com.google.gson.annotations.Expose
import org.hibernate.annotations.Fetch
import org.hibernate.annotations.FetchMode
import javax.persistence.*
@@ -7,21 +8,19 @@ import javax.validation.constraints.NotBlank
@Entity
data class ExerciseDevice (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val exerciseDeviceId: Long = 0,
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val exerciseDeviceId: Long = 0,
@get: NotBlank var name: String = "",
@get: NotBlank var description: String = "",
@get: NotBlank var imageUrl: String = "",
@get: NotBlank var sort: Int = 0,
@get: NotBlank var place: Int = 0
@Expose @get: NotBlank var name: String = "",
@Expose var description: String?,
@Expose var imageUrl: String?,
@Expose @get: NotBlank var sort: Int = 0,
@Expose @get: NotBlank var place: Int = 0
){
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseDevice")
@Fetch(value = FetchMode.SUBSELECT)
val translations: List<ExerciseDeviceTranslation> = mutableListOf<ExerciseDeviceTranslation>().toList()
@Expose val translations: List<ExerciseDeviceTranslation> = mutableListOf<ExerciseDeviceTranslation>().toList()
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseDevice")
@Fetch(value = FetchMode.SUBSELECT)
val alternatives: List<ExerciseDeviceAlternative> = mutableListOf<ExerciseDeviceAlternative>().toList()
@Expose val alternatives: List<ExerciseDeviceAlternative> = mutableListOf<ExerciseDeviceAlternative>().toList()
}
@@ -1,16 +1,16 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import kotlinx.serialization.Contextual
import kotlinx.serialization.Serializable
import javax.persistence.*
import javax.validation.constraints.NotNull
@Entity
data class ExerciseDeviceAlternative (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
var exerciseDeviceAlternativeId: Long = 0,
//@get: NotNull var exerciseDeviceParentId: Long?,
@get: NotNull var exerciseDeviceChildId: Long?
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) var exerciseDeviceAlternativeId: Long = 0,
@Expose @get: NotNull var exerciseDeviceChildId: Long?
) {
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@JoinColumn(name = "exerciseDeviceParentId", nullable = false)
@@ -1,23 +1,24 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import kotlinx.serialization.Contextual
import javax.persistence.*
import javax.validation.constraints.NotBlank
@Entity
data class ExerciseDeviceTranslation (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val translationId: Long = 0,
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val translationId: Long = 0,
@get: NotBlank var languageCode: String?,
@get: NotBlank var name: String = ""
@Expose @get: NotBlank var languageCode: String?,
@Expose @get: NotBlank var name: String = ""
) {
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@JoinColumn(name = "exerciseDeviceId", nullable = false)
@JsonIgnore
@Contextual
val exerciseDevice: ExerciseDevice? = null
}
@@ -1,6 +1,6 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import org.hibernate.annotations.Fetch
import org.hibernate.annotations.FetchMode
import org.springframework.lang.NonNull
@@ -9,16 +9,19 @@ import javax.validation.constraints.NotBlank
@Entity
data class ExerciseTree (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val treeId: Long = 0,
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val treeId: Long = 0,
@get: NotBlank var name: String = "",
@get: NotBlank var imageUrl: String = "",
@get: NonNull var active: Boolean?
@Expose @get: NotBlank var name: String = "",
@Expose @get: NotBlank var imageUrl: String = "",
@Expose @get: NonNull var active: Boolean?
) {
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseTree")
@Fetch(value = FetchMode.SUBSELECT)
val translations: List<ExerciseTreeTranslation> = mutableListOf<ExerciseTreeTranslation>().toList()
@Expose val translations: List<ExerciseTreeTranslation> = mutableListOf<ExerciseTreeTranslation>().toList()
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseTree")
@Fetch(value = FetchMode.SUBSELECT)
@Expose val abilities: List<ExerciseTreeAbility> = mutableListOf()
}
@@ -0,0 +1,22 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import javax.persistence.*
import javax.validation.constraints.NotNull
@Entity
data class ExerciseTreeAbility (
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val exerciseTreeAbilityId: Long = 0,
@Expose @get: NotNull var exerciseAbilityId: Int?
) {
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@JoinColumn(name="exerciseTreeId", nullable=false)
@JsonIgnore
val exerciseTree: ExerciseTree? = null
}
@@ -1,15 +1,13 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import javax.persistence.*
import javax.validation.constraints.NotNull
@Entity
data class ExerciseTreeParents (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
var exerciseTreeParentsId: Long = 0,
@get: NotNull var exerciseTreeParentId: Long?,
@get: NotNull var exerciseTreeChildId: Long?
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) var exerciseTreeParentsId: Long = 0,
@Expose @get: NotNull var exerciseTreeParentId: Long?,
@Expose @get: NotNull var exerciseTreeChildId: Long?
)
@@ -1,17 +1,16 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import javax.persistence.*
import javax.validation.constraints.NotBlank
@Entity
data class ExerciseTreeTranslation (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val translationId: Long = 0,
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val translationId: Long = 0,
@get: NotBlank var languageCode: String?,
@get: NotBlank var name: String = ""
@Expose @get: NotBlank var languageCode: String?,
@Expose @get: NotBlank var name: String = ""
) {
@@ -1,5 +1,6 @@
package com.aitrainer.api.model
import com.google.gson.annotations.Expose
import org.hibernate.annotations.FetchMode
import org.hibernate.annotations.Fetch
import org.springframework.lang.NonNull
@@ -9,39 +10,35 @@ import javax.validation.constraints.Null
@Entity
data class ExerciseType(
@get: NonNull var treeId: Int,
@get: NotBlank var name: String = "",
@get: NotBlank var description: String = "",
@get: Null var unit: String?,
@get: Null var unitQuantity: String?,
@get: Null var unitQuantityUnit: String?,
@get: NonNull var active: Boolean?,
@get: NonNull var base: Boolean?,
@Expose @get: NotBlank var name: String = "",
@Expose @get: NotBlank var description: String = "",
@Expose @get: Null var unit: String?,
@Expose @get: Null var unitQuantity: String?,
@Expose @get: Null var unitQuantityUnit: String?,
@Expose @get: NonNull var active: Boolean?,
@Expose @get: NonNull var base: Boolean?,
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
val exerciseTypeId: Long = 0
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val exerciseTypeId: Long = 0,
) {
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseType")
@Fetch(value = FetchMode.SUBSELECT)
val images: List<ExerciseTypeImage> = mutableListOf<ExerciseTypeImage>()
@Expose val images: List<ExerciseTypeImage> = mutableListOf()
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseType")
@Fetch(value = FetchMode.SUBSELECT)
val translations: List<ExerciseTypeTranslation> = mutableListOf<ExerciseTypeTranslation>()
@Expose val translations: List<ExerciseTypeTranslation> = mutableListOf()
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseType")
@Fetch(value = FetchMode.SUBSELECT)
val alternatives: List<ExerciseTypeAlternative> = mutableListOf<ExerciseTypeAlternative>()
@Expose val alternatives: List<ExerciseTypeAlternative> = mutableListOf()
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseType")
@Fetch(value = FetchMode.SUBSELECT)
val parents: List<ExerciseTypeParents> = mutableListOf<ExerciseTypeParents>()
@Expose val parents: List<ExerciseTypeParents> = mutableListOf()
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "exerciseType")
@Fetch(value = FetchMode.SUBSELECT)
val devices: List<ExerciseTypeDevice> = mutableListOf<ExerciseTypeDevice>()
@Expose val devices: List<ExerciseTypeDevice> = mutableListOf()
}
@@ -1,16 +1,14 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import javax.persistence.*
import javax.validation.constraints.NotNull
@Entity
data class ExerciseTypeAlternative (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
var exerciseTypeAlternativeId: Long = 0,
//@get: NotNull var exerciseTypeParentId: Long?,
@get: NotNull var exerciseTypeChildId: Long?
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) var exerciseTypeAlternativeId: Long = 0,
@Expose @get: NotNull var exerciseTypeChildId: Long?
) {
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@JoinColumn(name = "exerciseTypeParentId", nullable = false)
@@ -1,16 +1,15 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import javax.persistence.*
import javax.validation.constraints.NotNull
@Entity
data class ExerciseTypeDevice (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val exerciseTypeDeviceId: Long = 0,
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val exerciseTypeDeviceId: Long = 0,
@get: NotNull var exerciseDeviceId: Int?
@Expose @get: NotNull var exerciseDeviceId: Int?
) {
@@ -1,20 +1,18 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import org.springframework.lang.NonNull
import javax.persistence.*
import javax.validation.constraints.NotBlank
@Entity
data class ExerciseTypeImage (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val imageId: Long = 0,
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val imageId: Long = 0,
//@get: NonNull var exerciseTypeId: Integer?,
@get: NotBlank var name: String = "",
@get: NotBlank var type: String = "",
@get: NotBlank var url: String = ""
@Expose @get: NotBlank var name: String = "",
@Expose @get: NotBlank var type: String = "",
@Expose @get: NotBlank var url: String = ""
) {
@@ -1,16 +1,14 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import javax.persistence.*
import javax.validation.constraints.NotNull
@Entity
data class ExerciseTypeParents (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
var exerciseTypeParentsId: Long = 0,
@get: NotNull var exerciseTreeId: Long?
//@get: NotNull var exerciseTypeId: Long?
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) var exerciseTypeParentsId: Long = 0,
@Expose @get: NotNull var exerciseTreeId: Long?
) {
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@JoinColumn(name = "exerciseTypeId", nullable = false)
@@ -1,18 +1,17 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import javax.persistence.*
import javax.validation.constraints.NotBlank
@Entity
data class ExerciseTypeTranslation (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val translationId: Long = 0,
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val translationId: Long = 0,
@get: NotBlank var languageCode: String?,
@get: NotBlank var name: String = "",
@get: NotBlank var description: String = ""
@Expose @get: NotBlank var languageCode: String?,
@Expose @get: NotBlank var name: String = "",
@Expose @get: NotBlank var description: String = ""
) {
@ManyToOne(fetch = FetchType.EAGER, optional = false)
@@ -1,5 +1,6 @@
package com.aitrainer.api.model
import com.google.gson.annotations.Expose
import org.springframework.lang.NonNull
import javax.persistence.Entity
import javax.persistence.GeneratedValue
@@ -9,15 +10,14 @@ import javax.validation.constraints.Null
@Entity
data class Exercises (
@get: NonNull var exerciseTypeId: Long = 0,
@get: NonNull var customerId: Long = 0,
@get: NonNull var dateAdd: String? = null,
@get: NonNull var quantity: Double? = null,
@get: Null var restTime: Int?, // in seconds
@get: NonNull var unit: String? = null,
@get: NonNull var unitQuantity: Double? = null,
@get: NonNull var exercisePlanDetailId: Int = 0,
@Expose @get: NonNull var exerciseTypeId: Long = 0,
@Expose @get: NonNull var customerId: Long = 0,
@Expose @get: NonNull var dateAdd: String? = null,
@Expose @get: NonNull var quantity: Double? = null,
@Expose @get: Null var restTime: Int?, // in seconds
@Expose @get: NonNull var unit: String? = null,
@Expose @get: NonNull var unitQuantity: Double? = null,
@Expose @get: NonNull var exercisePlanDetailId: Int = 0,
@Id @GeneratedValue(strategy = GenerationType.IDENTITY)
val exerciseId: Long = 0
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val exerciseId: Long = 0
)
@@ -1,5 +1,6 @@
package com.aitrainer.api.model
import com.google.gson.annotations.Expose
import org.springframework.lang.NonNull
import javax.persistence.Entity
import javax.persistence.GeneratedValue
@@ -15,18 +16,18 @@ import javax.validation.constraints.NotBlank
@Entity
data class Product (
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var productId: Int,
@get: NotBlank var name: String = "",
@get: NotBlank var description: String = "",
@get: NonNull var appVersion: String? = null,
@get: NonNull var productSet: Int? = null,
@get: NonNull var sort: Int? = null,
@get: NonNull var type: String? = null,
@get: NonNull var validFrom: String? = null,
@get: NonNull var validTo: String? = null,
@get: NonNull var productIdIos: String? = null,
@get: NonNull var productIdAndroid: String? = null,
@get: NonNull var priceIos: Double? = null,
@get: NonNull var priceAndroid: Double? = null
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var productId: Int,
@Expose @get: NotBlank var name: String = "",
@Expose @get: NotBlank var description: String = "",
@Expose @get: NonNull var appVersion: String? = null,
@Expose @get: NonNull var productSet: Int? = null,
@Expose @get: NonNull var sort: Int? = null,
@Expose @get: NonNull var type: String? = null,
@Expose @get: NonNull var validFrom: String? = null,
@Expose @get: NonNull var validTo: String? = null,
@Expose @get: NonNull var productIdIos: String? = null,
@Expose @get: NonNull var productIdAndroid: String? = null,
@Expose @get: NonNull var priceIos: Double? = null,
@Expose @get: NonNull var priceAndroid: Double? = null
)
@@ -1,5 +1,6 @@
package com.aitrainer.api.model
import com.google.gson.annotations.Expose
import org.springframework.lang.NonNull
import javax.persistence.Entity
import javax.persistence.GeneratedValue
@@ -8,9 +9,9 @@ import javax.persistence.Id
@Entity
data class ProductTest (
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var productTestId: Int = 0,
@get: NonNull var customerId: Long = 0,
@get: NonNull var productId: Int = 0,
@get: NonNull var dateView: String? = null,
@get: NonNull var purchaseClick: Boolean = false
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var productTestId: Int = 0,
@Expose @get: NonNull var customerId: Long = 0,
@Expose @get: NonNull var productId: Int = 0,
@Expose @get: NonNull var dateView: String? = null,
@Expose @get: NonNull var purchaseClick: Boolean = false
)
@@ -1,5 +1,7 @@
package com.aitrainer.api.model
import com.google.gson.annotations.Expose
import kotlinx.serialization.Serializable
import org.hibernate.annotations.Fetch
import org.hibernate.annotations.FetchMode
import org.springframework.lang.NonNull
@@ -8,12 +10,12 @@ import javax.validation.constraints.NotBlank
@Entity
data class Property (
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var propertyId: Long = 0,
@get: NotBlank var propertyName: String = "",
@get: NotBlank var propertyUnit: String = ""
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var propertyId: Long = 0,
@Expose @get: NotBlank var propertyName: String = "",
@Expose @get: NotBlank var propertyUnit: String = ""
) {
@OneToMany(cascade = [(CascadeType.ALL)], fetch = FetchType.EAGER, mappedBy = "property")
@Fetch(value = FetchMode.SUBSELECT)
val translations: List<PropertyTranslation> = mutableListOf<PropertyTranslation>().toList()
@Expose val translations: List<PropertyTranslation> = mutableListOf<PropertyTranslation>().toList()
}
@@ -1,21 +1,24 @@
package com.aitrainer.api.model
import com.fasterxml.jackson.annotation.JsonIgnore
import com.google.gson.annotations.Expose
import javax.persistence.*
import javax.validation.constraints.NotBlank
@Entity
data class PropertyTranslation (
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) val translationId: Long = 0,
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) val translationId: Long = 0,
@get: NotBlank var languageCode: String?,
@get: NotBlank var propertyName: String = ""
@Expose @get: NotBlank var languageCode: String?,
@Expose @get: NotBlank var propertyName: String = "",
) {
@ManyToOne(fetch = FetchType.EAGER, optional = false)
) {
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "propertyId", nullable = false)
@JsonIgnore
val property: Property? = null
/* override fun toString() : String {
return "PropertyTranslation [id=$translationId, languageCode=$languageCode, propertyName=$propertyName]"
}*/
}
@@ -1,5 +1,6 @@
package com.aitrainer.api.model
import com.google.gson.annotations.Expose
import org.springframework.lang.NonNull
import javax.persistence.Entity
import javax.persistence.GeneratedValue
@@ -9,10 +10,10 @@ import javax.validation.constraints.NotBlank
@Entity
data class Purchase (
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var purchaseId: Long = 0,
@get: NonNull var customerId: Long = 0,
@get: NonNull var productId: Int = 0,
@get: NonNull var purchaseSum: Double? = null,
@get: NonNull var dateAdd: String? = null,
@get: NotBlank var currency: String = ""
@Expose @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var purchaseId: Long = 0,
@Expose @get: NonNull var customerId: Long = 0,
@Expose @get: NonNull var productId: Int = 0,
@Expose @get: NonNull var purchaseSum: Double? = null,
@Expose @get: NonNull var dateAdd: String? = null,
@Expose @get: NotBlank var currency: String = ""
)
@@ -0,0 +1,19 @@
package com.aitrainer.api.model
import org.springframework.lang.NonNull
import javax.persistence.Entity
import javax.persistence.GeneratedValue
import javax.persistence.GenerationType
import javax.persistence.Id
@Entity
data class Tracking (
@Id @GeneratedValue(strategy = GenerationType.IDENTITY) @get: NonNull var trackingId: Long = 0,
@get: NonNull var customerId: Long = 0,
@get: NonNull var dateAdd: String? = null,
@get: NonNull var event: String = "",
var eventValue: Double? = null,
var area: String = "",
var platform: String = "",
var version: String = ""
)