Add image reference tracking

This commit is contained in:
Tim
2025-07-24 13:42:16 +08:00
parent f80bee1281
commit 0081e51459
9 changed files with 176 additions and 16 deletions

View File

@@ -0,0 +1,26 @@
package com.openisle.model;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* Image entity tracking COS image reference counts.
*/
@Entity
@Getter
@Setter
@NoArgsConstructor
@Table(name = "images")
public class Image {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false, unique = true, length = 512)
private String url;
@Column(nullable = false)
private long refCount = 0;
}