package com.dbnt.faisp.main.faStatistics.crackdownsStatus.model.crackdownStatus;

import lombok.*;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;

@Getter
@Setter
@Entity
@NoArgsConstructor
@DynamicInsert
@DynamicUpdate
@Table(name = "crackdown_status_version")
@IdClass(CrackdownStatusVersion.CrackdownStatusVersionId.class)
public class CrackdownStatusVersion extends CrackdownStatusBaseEntity {

    @Id
    @Column(name = "cds_key")
    private Integer cdsKey;

    @Id
    @Column(name = "version_no")
    private Integer versionNo;

    @Embeddable
    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class CrackdownStatusVersionId implements Serializable {
        private Integer cdsKey;
        private Integer versionNo;
    }
}
