package com.jwipc.sys.dto;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Data
public class PurchaseGroupDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = -5454190445725011104L;
    /**
     * 主键
     */
    private Long id;

    /**
     * 采购组编码
     */
    private String purchaseGroupCode;

    /**
     * 采购组名称
     */
    private String purchaseGroupName;

    /**
     * SAP客户端
     */
    private String sapClient;

    /**
     * 组织机构编码
     */
    private String orgCode;

    /**
     * 组织机构名称
     */
    private String orgName;

    /**
     * 欠料计划是否自动发布供应商 1:是 2:否
     */
    private Integer autoDeploy;

    /**
     * 数据主键 sap_client+org_code+purchase_group_code
     */
    private String dataPrimary;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 最后一次更新时间
     */
    private LocalDateTime lastUpdateTime;

    /**
     * 删除标识 0:未删除 1:已删除
     */
    private Integer deleteFlag;

    /**
     * 以下位通用下拉框所用
     */
    private String codeWithDesc;
    private String code;
    private String name;

    public String getCodeWithDesc() {
        return StrUtil.format("({}){}", this.purchaseGroupCode, this.purchaseGroupName);
    }
    public String getCode() {
        return this.purchaseGroupCode;
    }
    public String getName() {
        return this.purchaseGroupName;
    }
}
