package com.inkasso.factoring.file.model.dto;

import cn.hutool.core.builder.Builder;
import com.inkasso.factoring.common.dict.impl.FileModuleDict;

/**
 * 附件信息传输对象
 * @author qiandaxian
 */
public class AttachmentDto {
    /**主表信息**/
    private Long entityId;
    /**文件类型**/
    private FileModuleDict.ChildEnum childEnum;
    /**说明信息**/
    private String typeExpand;

    public AttachmentDto(AttachmentDtoBuilder builder) {
        this.entityId = builder.entityId;
        this.childEnum = builder.childEnum;
        this.typeExpand = builder.typeExpand;
    }

    public Long getEntityId() {
        return entityId;
    }

    public void setEntityId(Long entityId) {
        this.entityId = entityId;
    }

    public FileModuleDict.ChildEnum getChildEnum() {
        return childEnum;
    }

    public void setChildEnum(FileModuleDict.ChildEnum childEnum) {
        this.childEnum = childEnum;
    }

    public String getTypeExpand() {
        return typeExpand;
    }

    public void setTypeExpand(String typeExpand) {
        this.typeExpand = typeExpand;
    }

    public static AttachmentDtoBuilder builder(){
        return new AttachmentDtoBuilder();
    }



    public static class AttachmentDtoBuilder implements Builder{

        //实体对象id
        private Long entityId;
        //类型枚举类
        private FileModuleDict.ChildEnum childEnum;
        //拓展字段
        private String typeExpand;

        @Override
        public AttachmentDto build() {
            return new AttachmentDto(this);
        }



        public AttachmentDtoBuilder setEntityId(Long entityId) {
            this.entityId = entityId;
            return this;
        }


        public AttachmentDtoBuilder setChildEnum(FileModuleDict.ChildEnum childEnum) {
            this.childEnum = childEnum;
            return this;
        }

        public AttachmentDtoBuilder setTypeExpand(String typeExpand) {
            this.typeExpand = typeExpand;
            return this;
        }
    }



}
