package thyyxxk.webserver.entity.orderZdMaintain.dto;

import java.io.Serializable;

import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import thyyxxk.webserver.entity.orderZdMaintain.enums.SupplyClass;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "yz_supply_type")
public class YzSupplyTypeDTO implements Serializable {

    private static final long serialVersionUID = 5037238763937215407L;

    /**
     * supplyCode
     */
    @TableField(value = "supply_code")
    private String supplyCode;

    /**
     * supplyName
     */
    @TableField(value = "supply_name")
    private String supplyName;

    /**
     * supplyOcc
     */
    @TableField(value = "supply_occ")
    private String supplyOcc;

    /**
     * delFlag
     */
    @TableField(value = "del_flag")
    private String delFlag;

    /**
     * sortCode
     */
    @TableField(value = "sort_code")
    private Integer sortCode;

    /**
     * class
     */
    @TableField(value = "class")
    private Integer classs;

    /**
     * printName
     */
    @TableField(value = "print_name")
    private String printName;

    /**
     * pyCode
     */
    @TableField(value = "py_code")
    private String pyCode;

    /**
     * dCode
     */
    @TableField(value = "d_code")
    private String dCode;

    /**
     * supplyChild
     */
    @TableField(value = "supply_child")
    private String supplyChild;

    /**
     * selfBuy
     */
    @TableField(value = "self_buy")
    private String selfBuy;

    /**
     * psFlag
     */
    @TableField(value = "ps_flag")
    private String psFlag;

    /**
     * zskFlag
     */
    @TableField(value = "zsk_flag")
    private String zskFlag;

    /**
     * cyFlag
     */
    @TableField(value = "cy_flag")
    private String cyFlag;

    /**
     * pringFlag
     */
    @TableField(value = "pring_flag")
    private String pringFlag;

    private String supplyChildName;

    public static LambdaQueryWrapper<YzSupplyTypeDTO> lambdaQueryWrapper() {
        return new LambdaQueryWrapper<>();
    }

    public static QueryWrapper<YzSupplyTypeDTO> queryWrapper() {
        return new QueryWrapper<>();
    }

    public String getClasssName() {
        return SupplyClass.getNameByCode(this.classs, "mz");
    }

}
