Pruduct, Purchase, Producttest
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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
|
||||
import javax.validation.constraints.NotBlank
|
||||
|
||||
/*enum class ProductType(val type: String) {
|
||||
SUBSCRIPTION("subscription"),
|
||||
IN_APP_CURR("in-app-currency")
|
||||
|
||||
}*/
|
||||
|
||||
@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 type: String? = null,
|
||||
@get: NonNull var validFrom: String? = null,
|
||||
@get: NonNull var validTo: String? = null
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
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 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
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
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
|
||||
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 = ""
|
||||
)
|
||||
Reference in New Issue
Block a user