-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64247d4
commit 3800b08
Showing
16 changed files
with
208 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
....Model/Assets/AssetApplicationMetadata.cs → ...sets/Metadata/AssetApplicationMetadata.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/protagonist/DLCS.Model/Assets/Metadata/AssetApplicationMetadataKeys.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using System.Dynamic; | ||
|
||
namespace DLCS.Model.Assets.Metadata; | ||
|
||
public static class AssetApplicationMetadataKeys | ||
{ | ||
public const string ThumbnailPolicy = "ThumbnailPolicy"; | ||
} |
15 changes: 15 additions & 0 deletions
15
src/protagonist/DLCS.Model/Assets/Metadata/IAssetApplicationMetadataRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using DLCS.Core.Types; | ||
|
||
namespace DLCS.Model.Assets.Metadata; | ||
|
||
public interface IAssetApplicationMetadataRepository | ||
{ | ||
public Task<List<int[]>> GetThumbnailSizes(AssetId assetId); | ||
|
||
public Task<AssetApplicationMetadata> AddApplicationMetadata( | ||
AssetApplicationMetadata metadata, | ||
CancellationToken cancellationToken = default); | ||
} |
34 changes: 34 additions & 0 deletions
34
src/protagonist/DLCS.Repository/Assets/AssetApplicationMetadataRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using DLCS.Core.Types; | ||
using DLCS.Model.Assets.Metadata; | ||
|
||
namespace DLCS.Repository.Assets; | ||
|
||
public class AssetApplicationMetadataRepository : IAssetApplicationMetadataRepository | ||
{ | ||
private readonly DlcsContext dlcsContext; | ||
|
||
public AssetApplicationMetadataRepository(DlcsContext dlcsContext) | ||
{ | ||
this.dlcsContext = dlcsContext; | ||
} | ||
|
||
public async Task<List<int[]>> GetThumbnailSizes(AssetId assetId) | ||
{ | ||
|
||
|
||
return new List<int[]>(); | ||
} | ||
|
||
public async Task<AssetApplicationMetadata> AddApplicationMetadata( | ||
AssetApplicationMetadata metadata, | ||
CancellationToken cancellationToken = default) | ||
{ | ||
var databaseMetadata= await dlcsContext.AssetApplicationMetadata.AddAsync(metadata, cancellationToken); | ||
await dlcsContext.SaveChangesAsync(cancellationToken); | ||
|
||
return databaseMetadata.Entity; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 48 additions & 49 deletions
97
...ssetApplicationMetadata table.Designer.cs → ...ssetApplicationMetadata table.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.