package com.yeejoin.amos.boot.module.hygf.api.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 施工派工工单
 *
 * @author system_generator
 * @date 2024-01-02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("hygf_work_order")
public class WorkOrder extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 派工单编号
     */
	@TableField("work_order_num")
    private String workOrderNum;

    /**
     * 制单人
     */
	@TableField("preparer")
    private String preparer;

    /**
     * 制单日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
	@TableField("issue_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date issueDate;

    /**
     * 计划开工日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
	@TableField("planned_start_date")
    private Date plannedStartDate;

    /**
     * 计划完工日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
	@TableField("planned_end_date")
    private Date plannedEndDate;

    /**
     * 区域公司id
     */
	@TableField("region_company_id")
    private Long regionCompanyId;

    /**
     * 区域公司名称
     */
	@TableField("region_company_name")
    private String regionCompanyName;

    /**
     * 区域公司orgcode
     */
	@TableField("region_code")
    private String regionCode;


    /**
     * 区域公司省市区
     */
    @TableField("region_address")
    private String regionAddress;


    /**
     * 工程负责人
     */
	@TableField("project_region_manager")
    private String projectRegionManager;

    /**
     * 工程负责人电话
     */
	@TableField("project_region_manager_phone")
    private String projectRegionManagerPhone;

    /**
     * 施工负责人
     */
	@TableField("construction_region_manager")
    private String constructionRegionManager;

    /**
     * 施工负责人电话
     */
	@TableField("construction_region_manager_phone")
    private String constructionRegionManagerPhone;

    /**
     * 派工单状态
     */
	@TableField("work_order_status")
    private String workOrderStatus;



    @ApiModelProperty(value = "平台经销商单位id")
    @TableField("amos_dealer_id")
    private Long amosDealerId;
    @ApiModelProperty(value = "平台经销商单位名称")
    @TableField("amos_dealer_name")
    private String amosDealerName;
    @ApiModelProperty(value = "平台经销商单位orgcode")
    @TableField("amos_dealer_org_code")
    private String amosDealerOrgCode;


    @ApiModelProperty(value = "工程负责人userId")
    @TableField("project_region_manager_user_id")
    private String projectRegionManagerUserId;

    @ApiModelProperty(value = "工程负责人userId")
    @TableField("construction_region_manager_user_id")
    private String constructionRegionManagerUserId;





    @TableField(exist = false)
    List<PeasantHousehold> peasantHouseholdId;

    @TableField(exist = false)
    int peasantHouseholdNum;//施工电站数


    @TableField(exist = false)
    int  peasantHouseholdSgNum;//已施工电站数
    /**
     * 经销商单位
     * */
    @TableField(exist = false)
    private Long developerId;
    @TableField(exist = false)
    int current;
    @TableField(exist = false)
    int size;
}
