package com.gxwebsoft.pwl.entity;

import java.math.BigDecimal;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.gxwebsoft.common.core.utils.JSONUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 卫兰的项目项目系统
 *
 * @author 科技小王子
 * @since 2025-03-22 14:34:35
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "PwlProject对象", description = "卫兰的项目项目系统")
public class PwlProject implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "项目名称")
    private String name;

    @Schema(description = "项目标识")
    private String code;

    @Schema(description = "上级id, 0是顶级")
    private Integer parentId;

    @Schema(description = "项目类型")
    private String type;

    @Schema(description = "项目图标")
    private String image;

    @Schema(description = "二维码")
    private String qrcode;

    @Schema(description = "链接地址")
    private String url;

    @Schema(description = "应用截图")
    private String images;

    @Schema(description = "底稿情况")
    private String files;

    @Schema(description = "应用介绍")
    private String content;

    @Schema(description = "年末资产总额(万元)")
    private BigDecimal totalAssets;

    @Schema(description = "合同金额")
    private BigDecimal contractPrice;

    @Schema(description = "实收金额")
    private BigDecimal payPrice;

    @Schema(description = "软件定价")
    private BigDecimal price;

    @Schema(description = "是否推荐")
    private Integer recommend;

    @Schema(description = "到期时间")
    private String expirationTime;

    @Schema(description = "项目信息-开票单位/汇款人")
    private String itemName;

    @Schema(description = "项目信息-年度")
    private String itemYear;

    @Schema(description = "项目信息-类型")
    private String itemType;

    @Schema(description = "项目信息-审计意见")
    private String itemOpinion;

    @Schema(description = "到账信息-银行名称")
    private String bankName;

    @Schema(description = "到账日期")
    private String bankPayTime;

    @Schema(description = "到账金额")
    private BigDecimal bankPrice;

    @Schema(description = "发票类型")
    private String invoiceType;

    @Schema(description = "发票类型")
    @TableField(exist = false)
    private String invoiceTypeName;

    @Schema(description = "开票日期")
    private String invoiceTime;

    @Schema(description = "开票金额")
    private BigDecimal invoicePrice;

    @Schema(description = "报告份数")
    private String reportNum;

    @Schema(description = "底稿人员")
    private String draftUserId;

    @Schema(description = "底稿人员")
    private String draftUser;

    @Schema(description = "参与成员")
    private String userIds;

    @Schema(description = "参与成员")
    private String users;

    @Schema(description = "签字注会")
    private String signUserId;

    @Schema(description = "签字注会")
    private String signUser;

    @Schema(description = "展业人员")
    private String saleUserId;

    @Schema(description = "展业人员")
    private String saleUser;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "排序(数字越小越靠前)")
    private Integer sortNumber;

    @Schema(description = "状态, 0正常, 1冻结")
    private Integer status;

    @Schema(description = "纸质底稿完成情况")
    private Integer paper;

    @Schema(description = "电子底稿完成情况")
    private Integer electron;

    @Schema(description = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @Schema(description = "客户ID")
    private Integer userId;

    @Schema(description = "真实姓名")
    @TableField(exist = false)
    private String realName;

    @Schema(description = "头像")
    @TableField(exist = false)
    private String avatar;

    @Schema(description = "手机号")
    @TableField(exist = false)
    private String phone;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

//    public Object getDraftUser() {
//      return JSON.parse(draftUser);
//    }
//    public Object getUsers() {
//      return JSON.parse(users);
//    }
//    public Object getSignUser() {
//      return JSON.parse(signUser);
//    }
//    public Object getSaleUser() {
//      return JSON.parse(saleUser);
//    }
//    public Object setDraftUser() {
//      return JSON.toJSON(draftUser);
//    }
}
