🗑️ Clean up the cloud file table unused fields
This commit is contained in:
@@ -20,14 +20,14 @@ public class SnCloudFile : ModelBase, ICloudFile, IIdentifiedResource
|
||||
|
||||
[NotMapped]
|
||||
[Column(TypeName = "jsonb")]
|
||||
public Dictionary<string, object?> FileMeta => Object!.Meta ?? [];
|
||||
[NotMapped] [MaxLength(256)] public string? MimeType => Object!.MimeType;
|
||||
[NotMapped] [MaxLength(256)] public string? Hash => Object!.Hash;
|
||||
public Dictionary<string, object?> FileMeta => Object?.Meta ?? [];
|
||||
[NotMapped] [MaxLength(256)] public string? MimeType => Object?.MimeType;
|
||||
[NotMapped] [MaxLength(256)] public string? Hash => Object?.Hash;
|
||||
public Instant? ExpiredAt { get; set; }
|
||||
[NotMapped] public long Size => Object!.Size;
|
||||
[NotMapped] public long Size => Object?.Size ?? 0;
|
||||
public Instant? UploadedAt { get; set; }
|
||||
[NotMapped] public bool HasCompression => Object!.HasCompression;
|
||||
[NotMapped] public bool HasThumbnail => Object!.HasThumbnail;
|
||||
[NotMapped] public bool HasCompression => Object?.HasCompression ?? false;
|
||||
[NotMapped] public bool HasThumbnail => Object?.HasThumbnail ?? false;
|
||||
|
||||
[MaxLength(32)] public string? ObjectId { get; set; }
|
||||
public SnFileObject? Object { get; set; }
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DysonNetwork.Shared.Models;
|
||||
|
||||
@@ -33,7 +34,7 @@ public class SnFileReplica : ModelBase
|
||||
public Guid Id { get; set; }
|
||||
|
||||
[MaxLength(32)] public string ObjectId { get; set; }
|
||||
public SnFileObject Object { get; set; } = null!;
|
||||
[JsonIgnore] public SnFileObject Object { get; set; } = null!;
|
||||
|
||||
public Guid? PoolId { get; set; }
|
||||
public FilePool? Pool { get; set; } = null!;
|
||||
|
||||
Reference in New Issue
Block a user