Make amenities global and super-admin managed
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
package com.android.trisolarisserver.models.room
|
||||
|
||||
import com.android.trisolarisserver.models.property.Property
|
||||
import jakarta.persistence.Column
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.FetchType
|
||||
import jakarta.persistence.GeneratedValue
|
||||
import jakarta.persistence.Id
|
||||
import jakarta.persistence.JoinColumn
|
||||
import jakarta.persistence.ManyToOne
|
||||
import jakarta.persistence.Table
|
||||
import jakarta.persistence.UniqueConstraint
|
||||
import java.time.OffsetDateTime
|
||||
@@ -16,7 +12,7 @@ import java.util.UUID
|
||||
@Entity
|
||||
@Table(
|
||||
name = "room_amenity",
|
||||
uniqueConstraints = [UniqueConstraint(columnNames = ["property_id", "name"])]
|
||||
uniqueConstraints = [UniqueConstraint(columnNames = ["name"])]
|
||||
)
|
||||
class RoomAmenity(
|
||||
@Id
|
||||
@@ -24,10 +20,6 @@ class RoomAmenity(
|
||||
@Column(columnDefinition = "uuid")
|
||||
val id: UUID? = null,
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY, optional = false)
|
||||
@JoinColumn(name = "property_id", nullable = false)
|
||||
var property: Property,
|
||||
|
||||
@Column(nullable = false)
|
||||
var name: String,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user