package cn.hmsoft.frame.data.model;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Map;

import cn.hmsoft.helper.StringHelper;
import cn.hmsoft.jdbc.entity.Table;

/**********************************************
 * 系统表-系统定时器
 * 
 * @author: zxq
 * @date: 2018-05-10 12:47:57
 * @version: 5.0.0
 * @email: revisit@126.com
 * @Company: www.hmsoft.cn
 */
@Table(tableName = "FRAME_TIMER", keyColumn = "TIMER_ID", sequenceName = "")
public class FrameTimer implements Serializable {
	private static final long serialVersionUID = -6242888001559955711L;
	//系统启动时是否自动运行
	private String auto_run_flag;
	//是否记录日志
	private String log_flag;
	//哪个系统需要使用这个定时器
	private String project_name;
	//每次运行时是否重启加载参数
	private String reload_param_flag;
	//是否正在运行
	private String running_status;
	//唯一运行标记
	private String single_run_flag;
	//定时器使用类
	private String timer_class;
	//定时器CRON表达式
	private String timer_cron;
	//定时器备注信息
	private String timer_desc;
	//定时器结束时间
	private LocalDateTime timer_end_time;
	//内部编号
	private Integer timer_id;
	//最后一次运行时间
	private LocalDateTime timer_last_time;
	//定时器名称
	private String timer_name;
	//下次运行时间
	private LocalDateTime timer_next_time;
	//定时器启动顺序
	private Integer timer_order;
	//定时器的参数信息
	private String timer_param;
	//定时器启动时间
	private LocalDateTime timer_start_time;
	//定时器状态，是否启用该定时器
	private String timer_status;

	/****
	 * 系统启动时是否自动运行
	 */
	public String getAuto_run_flag() {
		return this.auto_run_flag;
	}

	/****
	 * 系统启动时是否自动运行
	 */
	public void setAuto_run_flag(String auto_run_flag) {
		this.auto_run_flag = auto_run_flag;
	}

	/****
	 * 是否记录日志
	 */
	public String getLog_flag() {
		return this.log_flag;
	}

	/****
	 * 是否记录日志
	 */
	public void setLog_flag(String log_flag) {
		this.log_flag = log_flag;
	}

	/****
	 * 哪个系统需要使用这个定时器
	 */
	public String getProject_name() {
		return this.project_name;
	}

	/****
	 * 哪个系统需要使用这个定时器
	 */
	public void setProject_name(String project_name) {
		this.project_name = project_name;
	}

	/****
	 * 每次运行时是否重启加载参数
	 */
	public String getReload_param_flag() {
		return this.reload_param_flag;
	}

	/****
	 * 每次运行时是否重启加载参数
	 */
	public void setReload_param_flag(String reload_param_flag) {
		this.reload_param_flag = reload_param_flag;
	}

	/****
	 * 是否正在运行
	 */
	public String getRunning_status() {
		return this.running_status;
	}

	/****
	 * 是否正在运行
	 */
	public void setRunning_status(String running_status) {
		this.running_status = running_status;
	}

	/****
	 * 唯一运行标记
	 */
	public String getSingle_run_flag() {
		return this.single_run_flag;
	}

	/****
	 * 唯一运行标记
	 */
	public void setSingle_run_flag(String single_run_flag) {
		this.single_run_flag = single_run_flag;
	}

	/****
	 * 定时器使用类
	 */
	public String getTimer_class() {
		return this.timer_class;
	}

	/****
	 * 定时器使用类
	 */
	public void setTimer_class(String timer_class) {
		this.timer_class = timer_class;
	}

	/****
	 * 定时器CRON表达式
	 */
	public String getTimer_cron() {
		return this.timer_cron;
	}

	/****
	 * 定时器CRON表达式
	 */
	public void setTimer_cron(String timer_cron) {
		this.timer_cron = timer_cron;
	}

	/****
	 * 定时器备注信息
	 */
	public String getTimer_desc() {
		return this.timer_desc;
	}

	/****
	 * 定时器备注信息
	 */
	public void setTimer_desc(String timer_desc) {
		this.timer_desc = timer_desc;
	}

	/****
	 * 定时器结束时间
	 */
	public LocalDateTime getTimer_end_time() {
		return this.timer_end_time;
	}

	/****
	 * 定时器结束时间
	 */
	public void setTimer_end_time(LocalDateTime timer_end_time) {
		this.timer_end_time = timer_end_time;
	}

	/****
	 * 内部编号
	 */
	public Integer getTimer_id() {
		return this.timer_id;
	}

	/****
	 * 内部编号
	 */
	public void setTimer_id(Integer timer_id) {
		this.timer_id = timer_id;
	}

	/****
	 * 最后一次运行时间
	 */
	public LocalDateTime getTimer_last_time() {
		return this.timer_last_time;
	}

	/****
	 * 最后一次运行时间
	 */
	public void setTimer_last_time(LocalDateTime timer_last_time) {
		this.timer_last_time = timer_last_time;
	}

	/****
	 * 定时器名称
	 */
	public String getTimer_name() {
		return this.timer_name;
	}

	/****
	 * 定时器名称
	 */
	public void setTimer_name(String timer_name) {
		this.timer_name = timer_name;
	}

	/****
	 * 下次运行时间
	 */
	public LocalDateTime getTimer_next_time() {
		return this.timer_next_time;
	}

	/****
	 * 下次运行时间
	 */
	public void setTimer_next_time(LocalDateTime timer_next_time) {
		this.timer_next_time = timer_next_time;
	}

	/****
	 * 定时器启动顺序
	 */
	public Integer getTimer_order() {
		return this.timer_order;
	}

	/****
	 * 定时器启动顺序
	 */
	public void setTimer_order(Integer timer_order) {
		this.timer_order = timer_order;
	}

	/****
	 * 定时器的参数信息
	 */
	public String getTimer_param() {
		return this.timer_param;
	}

	/****
	 * 定时器的参数信息
	 */
	public void setTimer_param(String timer_param) {
		this.timer_param = timer_param;
	}

	/****
	 * 定时器启动时间
	 */
	public LocalDateTime getTimer_start_time() {
		return this.timer_start_time;
	}

	/****
	 * 定时器启动时间
	 */
	public void setTimer_start_time(LocalDateTime timer_start_time) {
		this.timer_start_time = timer_start_time;
	}

	/****
	 * 定时器状态，是否启用该定时器
	 */
	public String getTimer_status() {
		return this.timer_status;
	}

	/****
	 * 定时器状态，是否启用该定时器
	 */
	public void setTimer_status(String timer_status) {
		this.timer_status = timer_status;
	}

	protected Map<String, String> paramMap;

	/**************
	 * 参数信息
	 */
	public Map<String, String> getParamMap() {
		return paramMap;
	}
	
	/****************
	 * 准备参数
	 */
	public void prepareParamMap() {
		this.paramMap = StringHelper.toMap(this.timer_param);
	}
}