package com.jasamedika.medifirst2000.entities;

import com.jasamedika.medifirst2000.base.BaseTransaction;
import com.jasamedika.medifirst2000.helper.Caption;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Getter
@Setter
@Entity
@Table(name = "BatalRegistrasi_T")
public class BatalRegistrasi extends BaseTransaction {

	private static final long serialVersionUID = 8715467896949289924L;

	@ManyToOne
	@JoinColumn(name = "PasienDaftarFK")
	@NotNull(message = "PasienDaftar Harus Diisi")
	@Caption(value = "PasienDaftar")
	private PasienDaftar pasienDaftar;

	@Column(name = "PasienDaftarFK", insertable = false, updatable = false)
	private String pasienDaftarId;

	@ManyToOne
	@JoinColumn(name = "PegawaiFk")
	@Caption(value = "Pegawai")
	private Pegawai pegawai;

	@Column(name = "PegawaiFk", insertable = false, updatable = false)
	private Integer pegawaiId;

	@ManyToOne
	@JoinColumn(name = "PembatalanFK")
	@NotNull(message = "Pembatalan Harus Diisi")
	@Caption(value = "Pembatalan")
	private Pembatal pembatalan;

	@Column(name = "PembatalanFK", insertable = false, updatable = false)
	private Integer pembatalanId;

	@Column(name = "TanggalPembatalan", nullable = false, length = 100)
	@Caption(value = "TanggalPembatalan")
	private Date tanggalPembatalan;

	@Column(name = "alasanPembatalan", nullable = false, length = 100)
	@Caption(value = "alasanPembatalan")
	private String alasanPembatalan;

}
