package com.xdap.self_development.domain.pojo;

import com.definesys.mpaas.query.annotation.RowID;
import com.definesys.mpaas.query.annotation.RowIDType;
import com.definesys.mpaas.query.annotation.Table;
import com.definesys.mpaas.query.model.MpaasBasePojo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.sql.Timestamp;

@EqualsAndHashCode(callSuper = true)
@Data
@Table("yfsjglpt_model_approval_record")
public class ApprovalRecordPojo extends MpaasBasePojo {
    @RowID(sequence = "approval_record_s", type = RowIDType.UUID)
    private String id;
    private String flowId;
    private String node;
    private String userId;
    // 审批说明
    private String opinion;
    private String result; // PASS, REJECT
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Timestamp approvalTime;
    private Integer approvalLevel;

    public ApprovalRecordPojo(String flowId, String node, String userId, String opinion, String result, Timestamp approvalTime, Integer approvalLevel) {
        this.flowId = flowId;
        this.node = node;
        this.userId = userId;
        this.opinion = opinion;
        this.result = result;
        this.approvalTime = approvalTime;
        this.approvalLevel = approvalLevel;
    }
}