package cn.reghao.tnb.oss.api.dto;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author reghao
 * @date 2023-11-29 18:11:13
 */
@NoArgsConstructor
@Setter
@Getter
public class ObjectInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    private String objectId;
    private String objectName;
    private int fileType;
    private String filename;
    private long size;
    private String url;
    private int scope;
    private String sha256sum;
    private String updateTime;

    public ObjectInfo(String objectId, String objectName, int fileType, String filename, long size, int scope, String sha256sum) {
        this.objectId = objectId;
        this.objectName = objectName;
        this.fileType = fileType;
        this.filename = filename;
        this.size = size;
        this.url = objectName;
        this.scope = scope;
        this.sha256sum = sha256sum;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
