package com.sundot.airport.system.domain.approval;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.sundot.airport.common.annotation.Excel;
import com.sundot.airport.common.core.domain.BaseEntity;

/**
 * 审批抄送对象 approval_cc
 *
 * @author simon lin
 * @date 2025-09-06
 */
@TableName("approval_cc")
public class ApprovalCc extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 实例ID
     */
    @Excel(name = "实例ID")
    @NotNull(message = "实例ID不能为空")
    private Long instanceId;

    /**
     * 抄送用户ID
     */
    @Excel(name = "抄送用户ID")
    @NotNull(message = "抄送用户ID不能为空")
    private Long ccUserId;

    /**
     * 抄送用户姓名
     */
    @Excel(name = "抄送用户姓名")
    @NotBlank(message = "抄送用户姓名不能为空")
    @Size(min = 0, max = 50, message = "抄送用户姓名长度不能超过50个字符")
    private String ccUserName;

    /**
     * 抄送时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "抄送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date ccTime;

    /**
     * 是否已读(0否 1是)
     */
    @Excel(name = "是否已读", readConverterExp = "0=否,1=是")
    private String isRead;

    /**
     * 阅读时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "阅读时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date readTime;

    /**
     * 审批实例
     */
    @TableField(exist = false)
    private ApprovalInstance instance;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setInstanceId(Long instanceId) {
        this.instanceId = instanceId;
    }

    public Long getInstanceId() {
        return instanceId;
    }

    public void setCcUserId(Long ccUserId) {
        this.ccUserId = ccUserId;
    }

    public Long getCcUserId() {
        return ccUserId;
    }

    public void setCcUserName(String ccUserName) {
        this.ccUserName = ccUserName;
    }

    public String getCcUserName() {
        return ccUserName;
    }

    public void setCcTime(Date ccTime) {
        this.ccTime = ccTime;
    }

    public Date getCcTime() {
        return ccTime;
    }

    public void setIsRead(String isRead) {
        this.isRead = isRead;
    }

    public String getIsRead() {
        return isRead;
    }

    public void setReadTime(Date readTime) {
        this.readTime = readTime;
    }

    public Date getReadTime() {
        return readTime;
    }

    public ApprovalInstance getInstance() {
        return instance;
    }

    public void setInstance(ApprovalInstance instance) {
        this.instance = instance;
    }

    @Override
    public String toString() {
        return "ApprovalCc{" +
                "id=" + id +
                ", instanceId=" + instanceId +
                ", ccUserId=" + ccUserId +
                ", ccUserName='" + ccUserName + '\'' +
                ", ccTime=" + ccTime +
                ", isRead='" + isRead + '\'' +
                ", readTime=" + readTime +
                '}';
    }
}