package com.chushang.inspection.work.po;

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.chushang.common.mybatis.base.BaseEntity;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.*;

/**
  * @auther: zhao
  * @date: 2024/6/26 17:13
  */
/**
 * 工单信息
 * 通过 wrk_id 去 store 获取 商户信息, 去 terminal 获取终端信息
 */
@Data
@EqualsAndHashCode(callSuper=true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "wrk_info")
@Builder
public class WrkInfo extends BaseEntity {
    /**
     * id
     */
    @TableId(value = "wrk_id", type = IdType.ASSIGN_ID)
    private Long wrkId;

    /**
     * 租户id
     */
    @TableField(value = "dept_id")
    private Long deptId;
    @TableField(value = "dept_name")
    private String deptName;
    /**
     * 总任务id
     */
    @TableField(value = "task_id")
    private Long taskId;
    @TableField(value = "task_name")
    private String taskName;

    /**
     * 本级id
     */
    @TableField(value = "lower_task_id")
    private Long lowerTaskId;
    @TableField(value = "lower_task_name")
    private String lowerTaskName;

    /**
     * 业务员id
     */
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 业务员名字
     */
    @TableField(value = "user_name")
    private String userName;

    /**
     * 工单编号
     */
    @TableField(value = "work_no")
    private String workNo;

    /**
     * 工单类型
     */
    @TableField(value = "work_type")
    private Integer workType;

    /**
     * 巡检方式
     */
    @TableField(value = "work_method")
    private Integer workMethod;

    /**
     * 工单优先级
     */
    @TableField(value = "work_sort")
    private Integer workSort;

    /**
     * 工单来源
     */
    @TableField(value = "work_source")
    private Integer workSource;


    /**
     * 业务员处理时间
     */
    @TableField(value = "dispose_time")
    private LocalDateTime disposeTime;

    /**
     * 客户经理
     */
    @TableField(value = "account_manager")
    private String accountManager;

    /**
     * 经理电话
     */
    @TableField(value = "account_phone")
    private String accountPhone;
    /**
     * 服务结果
     */
    @TableField(value = "service_result")
    private Integer serviceResult;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;
    /**
     * 结束时间
     */
    @TableField(value = "end_time")
    private LocalDateTime endTime;
    /**
     * 工单状态
     */
    @TableField(value = "wrk_status")
    private Integer wrkStatus;
    /**
     * 建档日期
     */
    @TableField(value = "register_time")
    private LocalDate registerTime;
    /**
     * 工单进度
     */
    @TableField(value = "dis_schedule")
    private Integer disSchedule;
    /**
     * 项目id
     */
    @TableField(value = "project_id")
    private Long projectId;

}
