package com.jasamedika.medifirst2000.entities;

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

import javax.persistence.*;
import javax.validation.constraints.NotNull;

import static javax.persistence.GenerationType.SEQUENCE;

/**
 * class JenisKartu
 * 
 * @author Generator
 */
@Getter
@Setter
@Entity
@Table(name = "JenisKartu_M")
public class JenisKartu extends BaseMaster {

	@NotNull(message = "Jenis Kartu tidak boleh kosong")
	@Column(name = "JenisKartu", nullable = false, length = 20)
	@Caption(value = "Jenis Kartu")
	private String jenisKartu;

	@NotNull(message = "Kd Jenis Kartu tidak boleh kosong")
	@Column(name = "KdJenisKartu", nullable = false)
	@Caption(value = "Kode Jenis Kartu")
	private Byte kdJenisKartu;

	@NotNull(message = "QJenis Kartu tidak boleh kosong")
	@Column(name = "QJenisKartu", nullable = false)
	@Caption(value = "QJenis Kartu")
	private Byte qJenisKartu;

	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "public.jeniskartu_m_id_seq")
	@SequenceGenerator(name = "public.jeniskartu_m_id_seq", sequenceName = "public.jeniskartu_m_id_seq", allocationSize = 1)
	@Column(name = "id")
	protected Integer id;

}