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

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

/**
 * 无格式，整个文件就是一份数据
 *
 * @author lanyuanxiaoyao
 * @date 2024-11-20
 */
@Getter
@Setter
@ToString
@Entity
@DiscriminatorValue("NONE")
@SQLDelete(sql = "update " + Constants.TABLE_PREFIX + "resource_format" + " set deleted = true where id = ?")
@Where(clause = LogicDeleteIdOnlyEntity.LOGIC_DELETE_CLAUSE)
public class NoneResourceFormat extends ResourceFormat {
    @Override
    public Type getFormatType() {
        return Type.NONE;
    }
}
