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

import com.eshore.gringotts.core.Constants;
import com.eshore.gringotts.web.domain.base.entity.IdOnlyEntity;
import javax.persistence.DiscriminatorColumn;
import javax.persistence.DiscriminatorType;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 资源格式
 *
 * @author lanyuanxiaoyao
 * @date 2024-11-20
 */
@Getter
@Setter
@ToString
@Entity
@Table(name = Constants.TABLE_PREFIX + "resource_format")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "type", discriminatorType = DiscriminatorType.STRING)
public abstract class ResourceFormat extends IdOnlyEntity {
    public enum Type {
        NONE,
        LINE,
        JSON,
        JSON_LINE,
        CSV,
    }

    public abstract Type getFormatType();
}
