feat: add licence log

This commit is contained in:
2025-08-13 22:29:49 +02:00
parent 0563c7c8de
commit 0a56f8c180
3 changed files with 48 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ import org.eclipse.microprofile.openapi.annotations.media.Schema;
@Entity
@Table(name = "licence")
public class LicenceModel {
public class LicenceModel implements LoggableModel {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Schema(description = "L'identifiant de la licence.")
@@ -39,4 +39,14 @@ public class LicenceModel {
@Schema(description = "Licence payer", example = "true")
@Column(nullable = false, columnDefinition = "boolean default false")
boolean pay = false;
@Override
public String getObjectName() {
return "licence " + id.toString();
}
@Override
public LogModel.ObjectType getObjectType() {
return LogModel.ObjectType.Licence;
}
}