init
This commit is contained in:
@@ -1,23 +1,19 @@
|
||||
package space.luminic.finance.models
|
||||
|
||||
import org.springframework.data.annotation.Id
|
||||
import org.springframework.data.mongodb.core.mapping.DBRef
|
||||
import org.springframework.data.mongodb.core.mapping.Document
|
||||
import org.springframework.data.annotation.CreatedDate
|
||||
import org.springframework.data.annotation.LastModifiedDate
|
||||
import java.time.Instant
|
||||
|
||||
@Document(collection = "subscriptions")
|
||||
data class Subscription(
|
||||
@Id val id: String? = null,
|
||||
@DBRef val user: User? = null,
|
||||
var id: Int? = null,
|
||||
val user: User,
|
||||
val endpoint: String,
|
||||
val auth: String,
|
||||
val p256dh: String,
|
||||
var isActive: Boolean,
|
||||
val createdAt: Instant = Instant.now(),
|
||||
)
|
||||
@CreatedDate val createdAt: Instant? = null,
|
||||
@LastModifiedDate val updatedAt: Instant? = null,
|
||||
|
||||
)
|
||||
|
||||
|
||||
data class SubscriptionDTO (
|
||||
val endpoint: String,
|
||||
val keys: Map<String, String>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user