| | | 1 | | // SPDX-FileCopyrightText: 2026 Alper Çelik <[email protected]> |
| | | 2 | | // |
| | | 3 | | // SPDX-License-Identifier: AGPL-3.0-or-later |
| | | 4 | | |
| | | 5 | | using System.ComponentModel.DataAnnotations; |
| | | 6 | | using System.Text.Json; |
| | | 7 | | using Api.Files.FileProviders; |
| | | 8 | | |
| | | 9 | | namespace Api.Files.Models; |
| | | 10 | | |
| | | 11 | | public class FileProviderBackendConfig : IEntityMetadata |
| | | 12 | | { |
| | 1 | 13 | | public static byte IdPostfix => (byte)IdPostfixes.FileProviderBackend; |
| | | 14 | | |
| | | 15 | | [Key] |
| | | 16 | | public Guid Id { get; set; } |
| | | 17 | | public int RowVersion { get; set; } |
| | | 18 | | public NodaTime.Instant MetadataAddedAt { get; set; } |
| | | 19 | | public NodaTime.Instant MetadataUpdatedAt { get; set; } |
| | | 20 | | |
| | | 21 | | public Guid? OwnerId { get; set; } |
| | | 22 | | public bool InstanceWide { get; set; } |
| | | 23 | | public bool FallbackDefault { get; set; } |
| | 1 | 24 | | public FileKind[] DefaultFor { get; set; } = null!; |
| | | 25 | | |
| | | 26 | | public required FileProviderId ProviderId { get; set; } |
| | | 27 | | public JsonDocument? ProviderConfig { get; set; } |
| | | 28 | | public List<byte[]>? EncryptedSecrets { get; set; } |
| | | 29 | | } |