package com.realnet.scheduler.Entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import lombok.Data;

@Data
@Entity
@Table(name = "scheduled_jobs")
public class JobEntity {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Long id; // Auto increment

	private String name;

	private String cronExpression;

	private String status; // RUNNING / PAUSED / STOPPED

	@Column(length = 2000)
	private String description;
	private String jobType; // EMAIL / REPORT / SYNC etc.

	private Integer lakeid;

	public JobEntity() {
	}

	public JobEntity(String name, String cronExpression, String status, String description) {
		this.name = name;
		this.cronExpression = cronExpression;
		this.status = status;
		this.description = description;
	}

	// Getters & Setters
	public Long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCronExpression() {
		return cronExpression;
	}

	public void setCronExpression(String cronExpression) {
		this.cronExpression = cronExpression;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
}
