package com.chinaweal.aiccs.aiccs.business.entity;

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.chinaweal.aiccs.common.constant.BaseDataConstant;
import com.chinaweal.youfool.framework.springboot.json.LocalDateTimeStringSerializer;
import com.chinaweal.youfool.framework.springboot.mybatis.plus.SuperEntity;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 待办列表
 * </p>
 *
 * @author quebh
 * @since 2023-05-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "xr_task_list")
@ApiModel(value = "XrTaskList对象", description = "待办列表")
public class XrTaskList extends SuperEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 待办主键
     */
    @ApiModelProperty(value = "待办主键")
    @TableId(value = "task_like_id", type = IdType.ASSIGN_UUID)
    private String taskLikeId;

    /**
     * 流程主键
     */
    @ApiModelProperty(value = "流程主键")
    @TableField("work_flow_id")
    private String workFlowId;

    /**
     * 业务主键
     */
    @ApiModelProperty(value = "业务主键")
    @TableField("biz_seq_no")
    private String bizSeqNo;

    /**
     * 签收者ID
     */
    @ApiModelProperty(value = "签收者ID")
    @TableField("sign_user_id")
    private String signUserId;

    /**
     * 发送机构ID
     */
    @ApiModelProperty(value = "发送机构ID")
    @TableField("sender_org_id")
    private String senderOrgId;

    /**
     * 下一步签收用户ID
     */
    @ApiModelProperty(value = "下一步签收用户ID")
    @TableField("sender_user_id")
    private String senderUserId;

    /**
     * 下一步签收用户机构ID
     */
    @ApiModelProperty(value = "下一步签收用户机构ID")
    @TableField("send_to_org_id")
    private String sendToOrgId;

    /**
     * 受理号
     */
    @ApiModelProperty(value = "受理号")
    @TableField("accept_no")
    private String acceptNo;

    /**
     * 业务名称
     */
    @ApiModelProperty(value = "业务名称")
    @TableField("bus_name")
    private String busName;

    /**
     * 签收/受理时间
     */
    @ApiModelProperty(value = "签收/受理时间")
    @JsonSerialize(using = LocalDateTimeStringSerializer.class)
    @TableField("sign_time")
    private LocalDateTime signTime;

    /**
     * 业务类型
     * @see BaseDataConstant
     */
    @ApiModelProperty(value = "业务类型")
    @TableField("bus_type")
    private String busType;

    /**
     * 业务状态
     * @see BaseDataConstant#BUSINESS_STATUS_TRANSACT 等等
     */
    @ApiModelProperty(value = "业务状态")
    @TableField("bus_status")
    private String busStatus;

    /**
     * 环节名称
     */
    @ApiModelProperty(value = "环节名称")
    @TableField("link_name")
    private String linkName;

    /**
     * 是否签收
     */
    @ApiModelProperty(value = "是否签收")
    @TableField("is_signon")
    private String isSignon;

    /**
     * 发送时间
     */
    @ApiModelProperty(value = "发送时间")
    @JsonSerialize(using = LocalDateTimeStringSerializer.class)
    @TableField("sender_time")
    private LocalDateTime senderTime;

    /**
     * 发起机构代码
     */
    @ApiModelProperty(value = "发起机构代码")
    @TableField("apply_org_id")
    private String applyOrgId;

    /**
     * 地区代码
     */
    @ApiModelProperty(value = "地区代码")
    @TableField("area_code")
    private String areaCode;

    /**
     * 是否超过工作时限’1‘是’0‘否
     */
    @ApiModelProperty(value = "是否超过工作时限’1‘是’0‘否")
    @TableField("is_deadline")
    private String isDeadline;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;


    /**
     * 来源
     * @see BaseDataConstant#SOURCE_PC 等等
     */
    @ApiModelProperty(value = "来源")
    @TableField("source")
    private String source;

    /**
     * 主体类型 company：企业；individual：个体户；farmer：农专
     */
    @ApiModelProperty(value = "主体类型")
    @TableField(exist = false)
    private String type;

    @ApiModelProperty(value = "转办机关")
    @TableField(exist = false)
    private String nextOrgId;

    /**
     * 数据来源，0或null：系统生成的数据，1：年报系统，2：佛山年报，3：免申即享
     */
    @ApiModelProperty(value = "数据来源")
    @TableField("origin")
    private String origin;

    /**
     * 年报信用修复传输标记，nA传输到内网，nB传输去外网
     */
    @ApiModelProperty(value = "年报信用修复传输标记")
    @TableField("SynFlag")
    private String SynFlag;
}
