package com.jpsoft.shinestar.modules.base.entity;

import java.io.Serializable;
import java.util.Date;
import java.text.SimpleDateFormat;
import java.math.BigDecimal;
import java.util.List;

import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
  描述:base_work_shift_info的实体类
 */
@Data
public class WorkShiftInfo {
	private String id;
	private String number;
	private String name;
	private Integer swipeCardCount;
	private BigDecimal days;

	/**
	 * 上班时间所在日期(-1-昨天,0-当天,1-明天)
	 */
	private Integer workDayType;

	public Integer getWorkDayType() {
		if (workDayType==null){
			return 0;
		}
		else{
			return workDayType;
		}
	}

	/**
	 * 上班时间
	 */
	private String workTime;

	/**
	 * 下班时间所在日期(-1-昨天,0-当天,1-明天)
	 */
	private Integer closingDayType;

	public Integer getClosingDayType() {
		if (closingDayType==null){
			return 0;
		}
		else{
			return closingDayType;
		}
	}

	/**
	 * 下班时间
	 */
	private String closingTime;

	/**
	 * 上班考勤开始时间
	 */
	private String workStartTime;

	/**
	 * 上班考勤结束时间
	 */
	private String workEndTime;

	/**
	 * 下班考勤开始时间
	 */
	private String closingStartTime;

	/**
	 * 下班考勤结束时间
	 */
	private String closingEndTime;

	private String createBy;
	private Date createTime;
	private String updateBy;
	private Date updateTime;
	private Boolean delFlag;

	private List<CompanyInfo> companyList;

	private String companyNames;

	private String workTimeRange;
	private String closingTimeRange;

	private String workDayTypeN;

	public String getWorkDayTypeN() {
		if(workDayType==null){
			return "";
		}
		else if(workDayType==-1){
			return "昨天";
		}
		else if(workDayType==0){
			return "今天";
		}
		else if(workDayType==1){
			return "明天";
		}
		else{
			return "";
		}
	}

	private String closingDayTypeN;

	public String getClosingDayTypeN() {
		if(closingDayType==null){
			return "";
		}
		else if(closingDayType==-1){
			return "昨天";
		}
		else if(closingDayType==0){
			return "今天";
		}
		else if(closingDayType==1){
			return "明天";
		}
		else{
			return "";
		}
	}
}