package com.ankurm.softdelete; import jakarta.persistence.*; import org.hibernate.annotations.SoftDelete; import org.hibernate.annotations.SoftDeleteType; /** One place to say "soft delete" for a family of entities. */ @MappedSuperclass @SoftDelete(strategy = SoftDeleteType.TIMESTAMP, columnName = "deleted_at") public abstract class SoftBase { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; public Long getId() { return id; } }