package com.rera.mss.model

import org.hibernate.annotations.CreationTimestamp
import java.time.LocalDateTime
import javax.persistence.*

@Entity
@Table(name = "Inverter_measurement")
class InverterMeasurement(
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        var id: Long = 0,

        @Column(name = "measured_at")
        var measuredAt: Long = System.currentTimeMillis(),

        @Column(name = "reading_value")
        var readingValue: Float,

        @ManyToOne
        @JoinColumn(name = "inverter_id")
        var inverter: Inverter,

        @ManyToOne
        @JoinColumn(name = "reading_type_id")
        var readingType: ReadingType
)