package com.jwipc.sys.dto;

import cn.hutool.core.util.StrUtil;
import lombok.Data;

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

/**
 * <p>
 * 采购品类表
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-02-04
 */
@Data
public class PurchaseCategoryDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    /**
     * 1：正常2：禁用
     */
    private Integer status;

    /**
     * 一级采购编码
     */
    private String firstLevelPurchaseCode;

    /**
     * 一级采购名称
     */
    private String firstLevelPurchaseName;

    /**
     * 二级采购编码
     */
    private String secondLevelPurchaseCode;

    /**
     * 二级采购名称
     */
    private String secondLevelPurchaseName;

    /**
     * 创建日期
     */
    private LocalDateTime createTime;

    /**
     * 创建人id
     */
    private Integer createUserId;

    /**
     * 创建人名称
     */
    private String createUserName;

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

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