/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the yifu4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.yifu.cloud.plus.v1.csp.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * 作业自动化-离职-操作日志
 *
 * @author hgw
 * @date 2025-11-23 10:55:29
 */
@Data
@TableName("employee_registration_leave_log")
@Schema(description = "作业自动化-离职-操作日志")
public class EmployeeRegistrationLeaveLog {

	/**
	 * 主键ID
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ExcelProperty("主键ID")
	@Schema(description = "主键ID")
	private String id;
	/**
	 * 离职待办主表ID
	 */
	@ExcelAttribute(name = "离职待办主表ID", isNotEmpty = true, errorInfo = "离职待办主表ID不能为空", maxLength = 32)
	@NotBlank(message = "离职待办主表ID不能为空")
	@Length(max = 32, message = "离职待办主表ID不能超过32个字符")
	@ExcelProperty("离职待办主表ID")
	@Schema(description = "离职待办主表ID")
	private String leaveId;
	/**
	 * 操作人
	 */
	@ExcelAttribute(name = "操作人", maxLength = 36)
	@Length(max = 36, message = "操作人不能超过36个字符")
	@ExcelProperty("操作人")
	@Schema(description = "操作人")
	private String createName;

	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
	@Schema(description = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	@HeadFontStyle(fontHeightInPoints = 11)
	@ExcelProperty("创建时间")
	@ColumnWidth(18)
	private LocalDateTime createTime;

	/**
	 * 操作事项
	 */
	@ExcelAttribute(name = "操作事项", maxLength = 200)
	@Length(max = 200, message = "操作事项不能超过200个字符")
	@ExcelProperty("操作事项")
	@Schema(description = "操作事项")
	private String content;

}
