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

import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

/**
 * 实体类公共字段
 *
 * @author lanyuanxiaoyao
 * @date 2024-11-20
 */
@Getter
@Setter
@ToString(callSuper = true)
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public class LogicDeleteEntity extends SimpleEntity {
    public static final String LOGIC_DELETE_CLAUSE = "deleted = false";

    @Column(nullable = false)
    private Boolean deleted = false;
}
