This commit is contained in:
xds
2025-10-16 15:06:20 +03:00
commit 040da34ff7
78 changed files with 3934 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
package space.luminic.finance.models
import org.springframework.data.annotation.CreatedBy
import org.springframework.data.annotation.CreatedDate
import org.springframework.data.annotation.Id
import org.springframework.data.annotation.LastModifiedBy
import org.springframework.data.annotation.LastModifiedDate
import org.springframework.data.annotation.ReadOnlyProperty
import org.springframework.data.mongodb.core.mapping.Document
import org.springframework.data.annotation.Transient
import java.time.Instant
@Document(collection = "spaces")
data class Space (
@Id val id: String? = null,
val name: String,
val ownerId: String,
val participantsIds: List<String> = emptyList(),
var isDeleted: Boolean = false,
@CreatedBy val createdById: String? = null,
@CreatedDate val createdAt: Instant? = null,
@LastModifiedBy val updatedById: String? = null,
@LastModifiedDate var updatedAt: Instant? = null,
) {
@ReadOnlyProperty var owner: User? = null
@ReadOnlyProperty var participants: List<User>? = null
@ReadOnlyProperty var createdBy: User? = null
@ReadOnlyProperty var updatedBy: User? = null
}