package cn.iocoder.yudao.module.system.dal.dataobject.biz;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serializable;
import java.util.*;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;


import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 老人请假管理 DO
 *
 * @author 管理员
 */
@TableName("elderly_ask_leave")
@KeySequence("elderly_ask_leave_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ElderlyAskLeaveDO implements Serializable {

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 老人ID
     */
    @Schema(description = "老人ID", example = "1596")
    private Long elderId;

    @Schema(description = "老人姓名")
    private String elderName;
    /**
     * 陪同人
     */
    @Schema(description = "陪同人")
    private String accompanyPerson;
    /**
     * 外出时间
     */
    @Schema(description = "外出时间")
//    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,timezone = "GMT+8")
    private Date outDate;
    /**
     * 计划返回时间
     */
//    @Schema(description = "计划返回时间")
//    private Date plannedDate;
    /**
     * 外出登记人
     */
    @Schema(description = "外出登记人")
    private String outPerson;
    /**
     * 联系电话
     */
    @Schema(description = "联系电话")
    private String outPhone;
    /**
     * 返回时间
     */
    @Schema(description = "返回时间")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,timezone = "GMT+8")
    private Date comeDate;
    /**
     * 状态(0正常，1删除)
     */
    @Schema(description = "状态,0正常，1删除", example = "1")
    private Integer status;
    /**
     * 外出登记人
     */
    @Schema(description = "外出登记人")
    private String createBy;
    /**
     * 登记外出时间
     */
    @Schema(description = "登记外出时间")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,timezone = "GMT+8")
    private Date createDate;
    /**
     * 返回登记人
     */
    @Schema(description = "返回登记人")
    private String updateBy;
    /**
     * 实际返回时间
     */
    @Schema(description = "实际返回时间")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND,timezone = "GMT+8")
    private Date updateDate;
    /**
     * 外出事由
     */
    @Schema(description = "外出事由")
    private String remarks;
    /**
     * 外出类型
     */
    @Schema(description = "外出类型", example = "1")
    private String type;
    /**
     * 请假状态
     */
    @Schema(description = "请假状态", example = "1")
    private Integer leaveStatus;
    /**
     * 预估天数
     */
    @Schema(description = "预估天数")
    private BigDecimal numberDays;

    @Schema(description = "外出退费配置项ID")
    private Long outboundRefundConfigId;

    /**
     * 附件
     */
    @Schema(description = "附件", example = "1")
    private String extraFile;

    private Integer orgType;

    private Long tenantId;

    @Schema(description = "租户名称")
    @TableField(exist = false)
    private String tenantName;

    @TableField(exist = false)
    private ElderlyInfoDO elderlyInfo;

    @Schema(description = "归属月")
    private String belongMonth;

}