- demo-service (port 8085): auth, user profile, demo-to-IM token bridge - file-service (port 8086): SHA-256 dedup upload, ImageIO thumbnails, 30-day reclaim - tenant-service: GET /api/sdk/config?appId returns imWsUrl/fileServiceUrl/features - im-service: GET /api/im/admin/users/search fuzzy match by userId or nickname Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
77 行
2.5 KiB
Java
77 行
2.5 KiB
Java
package com.xuqm.file.entity;
|
|
|
|
import jakarta.persistence.*;
|
|
import java.time.Instant;
|
|
|
|
@Entity
|
|
@Table(name = "file_record")
|
|
public class FileEntity {
|
|
|
|
@Id
|
|
@Column(name = "id", length = 36, nullable = false, updatable = false)
|
|
private String id;
|
|
|
|
@Column(name = "hash", length = 64, nullable = false, unique = true)
|
|
private String hash;
|
|
|
|
@Column(name = "original_name", length = 255)
|
|
private String originalName;
|
|
|
|
@Column(name = "mime_type", length = 128)
|
|
private String mimeType;
|
|
|
|
@Column(name = "size", nullable = false)
|
|
private long size;
|
|
|
|
@Column(name = "ext", length = 16)
|
|
private String ext;
|
|
|
|
@Column(name = "storage_path", length = 512, nullable = false)
|
|
private String storagePath;
|
|
|
|
@Column(name = "thumbnail_path", length = 512)
|
|
private String thumbnailPath;
|
|
|
|
@Column(name = "thumbnail_size", nullable = false)
|
|
private long thumbnailSize;
|
|
|
|
@Column(name = "created_at", nullable = false, updatable = false)
|
|
private Instant createdAt;
|
|
|
|
@Column(name = "last_accessed_at", nullable = false)
|
|
private Instant lastAccessedAt;
|
|
|
|
public String getId() { return id; }
|
|
public void setId(String id) { this.id = id; }
|
|
|
|
public String getHash() { return hash; }
|
|
public void setHash(String hash) { this.hash = hash; }
|
|
|
|
public String getOriginalName() { return originalName; }
|
|
public void setOriginalName(String originalName) { this.originalName = originalName; }
|
|
|
|
public String getMimeType() { return mimeType; }
|
|
public void setMimeType(String mimeType) { this.mimeType = mimeType; }
|
|
|
|
public long getSize() { return size; }
|
|
public void setSize(long size) { this.size = size; }
|
|
|
|
public String getExt() { return ext; }
|
|
public void setExt(String ext) { this.ext = ext; }
|
|
|
|
public String getStoragePath() { return storagePath; }
|
|
public void setStoragePath(String storagePath) { this.storagePath = storagePath; }
|
|
|
|
public String getThumbnailPath() { return thumbnailPath; }
|
|
public void setThumbnailPath(String thumbnailPath) { this.thumbnailPath = thumbnailPath; }
|
|
|
|
public long getThumbnailSize() { return thumbnailSize; }
|
|
public void setThumbnailSize(long thumbnailSize) { this.thumbnailSize = thumbnailSize; }
|
|
|
|
public Instant getCreatedAt() { return createdAt; }
|
|
public void setCreatedAt(Instant createdAt) { this.createdAt = createdAt; }
|
|
|
|
public Instant getLastAccessedAt() { return lastAccessedAt; }
|
|
public void setLastAccessedAt(Instant lastAccessedAt) { this.lastAccessedAt = lastAccessedAt; }
|
|
}
|