package com.cool.store.entity.tp;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;
import javax.persistence.*;

/**
 * <p>
 * 十二分制-申请单
 * </p>
 *
 * @author wangff
 * @since 2025/11/4
 */
@Table(name = "zxjp_tp_apply_form")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class TpApplyFormDO {
    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    /**
     * 单据类型，0加分单 1警告书 2处罚书
     */
    private Integer type;

    /**
     * 申请单号
     */
    @Column(name = "apply_no")
    private String applyNo;

    /**
     * 门店id
     */
    @Column(name = "store_id")
    private String storeId;

    /**
     * 规则id（项目类型）
     */
    @Column(name = "rule_id")
    private Long ruleId;

    /**
     * 规则编码
     */
    @Column(name = "rule_no")
    private String ruleNo;
    
    /**
     * 问题分类
     */
    @Column(name = "problem_classification")
    private String problemClassification;

    /**
     * 项目大类
     */
    @Column(name = "project_category")
    private String projectCategory;

    /**
     * 项目名称
     */
    @Column(name = "project_name")
    private String projectName;

    /**
     * 是否加满
     */
    @Column(name = "is_full")
    private Integer isFull;

    /**
     * 分值
     */
    private BigDecimal score;

    /**
     * 备注
     */
    private String remark;

    /**
     * 金额
     */
    private BigDecimal amount;

    /**
     * 申请复议截止日期
     */
    @Column(name = "appeal_end_date")
    private Date appealEndDate;

    /**
     * 状态
     */
    private String status;

    /**
     * 缴费状态，0未缴费 1无需缴费 2已缴费
     */
    @Column(name = "pay_status")
    private Integer payStatus;

    /**
     * 是否为草稿 0否 1是
     */
    @Column(name = "is_draft")
    private Integer isDraft;

    /**
     * 来源，0非小程序 1小程序
     */
    @Column(name = "source")
    private Integer source;

    /**
     * 申请人(创建人)id
     */
    @Column(name = "apply_user_id")
    private String applyUserId;

    /**
     * 申请人(创建人)名称
     */
    @Column(name = "apply_user_name")
    private String applyUserName;

    /**
     * 审批人id
     */
    @Column(name = "approve_user_id")
    private String approveUserId;

    /**
     * 审批时间
     */
    @Column(name = "approve_time")
    private Date approveTime;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    /**
     * 是否删除 0否1是
     */
    private Integer deleted;

    /**
     * 证明图片列表
     */
    @Column(name = "proof_urls")
    private String proofUrls;

    /**
     * 处罚单id
     */
    @Column(name = "penalty_id")
    private Long penaltyId;

    /**
     * 申请人姓名（复议申请单）
     */
    @Column(name = "applicant_name")
    private String applicantName;

    /**
     * 联系电话
     */
    @Column(name = "phone")
    private String phone;

    /**
     * 复议理由
     */
    @Column(name = "appeal_reason")
    private String appealReason;

    /**
     * 复议详细理由
     */
    @Column(name = "appeal_detail_reason")
    private String appealDetailReason;
}