package cn.superdesk.uniorder.dto._constant;

import cn.hutool.core.util.StrUtil;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;

/**
 * @Description: 三段
 * @Author: linjinyu
 * @CreateDate: 2022/3/11 下午12:17
 * @UpdateUser: linjinyu
 * @UpdateDate: 2022/3/11 下午12:17
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
@Slf4j
@NoArgsConstructor
@AllArgsConstructor
@Builder(toBuilder = true)
@Data
public class ResourceStruct implements Serializable {

	private String basePath;
	private String relativePath;
	private String fileName;


	public String getPath() {
		String format = StrUtil.format("{}{}{}", basePath, relativePath, fileName);

		log.info("ResourceStruct => {}", format);
		return format;
	}

	public String getUri() {
		return StrUtil.format("{}{}{}", basePath, relativePath, fileName);
	}
}
