package com.huimv.employment.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDateTime;

/**
 * 用工订单头表 {@code fe_employment_order}（精简）：用工明细在 {@code fe_order_work_item}。
 */
@TableName("fe_employment_order")
public class FeEmploymentOrder {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String orderNo;

    /** 所属企业；可空，企业认证后回填 */
    private Long enterpriseId;

    /** 下单用户，通常从草稿 user_id 复制 */
    private Long userId;

    private Long draftId;

    private Long selectedPlanId;

    private String title;

    /** confirmed / in_progress / settling / completed 等 */
    private String orderStatus;

    /** existing → 人员登记；recruit → 临时工招聘 */
    private String workerSource;

    /**
     * 六步编码：draft / enterprise_auth / worker_registration|worker_recruitment /
     * task_publish / settlement|settlement_pending / invoice_archive|completed。
     * 任务发布写入 {@code task_publish}，不再使用 {@code work_started}。
     */
    private String currentStepCode;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    @TableLogic
    private Integer delFlag;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Long getEnterpriseId() {
        return enterpriseId;
    }

    public void setEnterpriseId(Long enterpriseId) {
        this.enterpriseId = enterpriseId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getDraftId() {
        return draftId;
    }

    public void setDraftId(Long draftId) {
        this.draftId = draftId;
    }

    public Long getSelectedPlanId() {
        return selectedPlanId;
    }

    public void setSelectedPlanId(Long selectedPlanId) {
        this.selectedPlanId = selectedPlanId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getWorkerSource() {
        return workerSource;
    }

    public void setWorkerSource(String workerSource) {
        this.workerSource = workerSource;
    }

    public String getCurrentStepCode() {
        return currentStepCode;
    }

    public void setCurrentStepCode(String currentStepCode) {
        this.currentStepCode = currentStepCode;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }
}
