package com.eshore.gringotts.web.domain.entity;

import com.eshore.gringotts.core.Constants;
import com.eshore.gringotts.web.domain.base.entity.LogicDeleteEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where;

/**
 * 上传文件
 *
 * @author lanyuanxiaoyao
 * @date 2024-11-21
 */
@Getter
@Setter
@ToString
@Entity
@DynamicUpdate
@Table(name = Constants.TABLE_PREFIX + "data_file")
@SQLDelete(sql = "update " + Constants.TABLE_PREFIX + "data_file" + " set deleted = true where id = ?")
@Where(clause = LogicDeleteEntity.LOGIC_DELETE_CLAUSE)
public class DataFile extends LogicDeleteEntity {
    private String filename;
    private Long size;
    private String md5;
    private String path;
    private String type;
}
