package space.nstart.pcp.pcp_satellite_catalog_service.entity

import jakarta.persistence.Column
import jakarta.persistence.Entity
import jakarta.persistence.Id
import jakarta.persistence.IdClass
import jakarta.persistence.Table
import java.io.Serializable

@Entity
@Table(name = "satellite_slot_angle")
@IdClass(SatelliteSlotAngleId::class)
class SatelliteSlotAngleEntity(
    @Id
    @Column(name = "satellite_id")
    val satelliteId: Long = 0,
    @Id
    @Column(name = "position")
    val position: Int = 0,
    @Column(nullable = false)
    val angleBegin: Double = 0.0,
    @Column(nullable = false)
    val angleEnd: Double = 0.0
)

data class SatelliteSlotAngleId(
    val satelliteId: Long = 0,
    val position: Int = 0
) : Serializable
