Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Entity Framework details for the new tables #710

Merged
merged 7 commits into from
Jan 30, 2024

Conversation

JackLewis-digirati
Copy link
Contributor

@JackLewis-digirati JackLewis-digirati commented Jan 18, 2024

Resolves #618

This pull request adds migrations for 2 new tables

  • DeliveryChannelPolicies - used to store default and customer specific policies for delivery channels
  • ImageDeliveryChannels - stores details of delivery channels attached to assets

@JackLewis-digirati JackLewis-digirati marked this pull request as ready for review January 18, 2024 15:20
@JackLewis-digirati JackLewis-digirati requested a review from a team as a code owner January 18, 2024 15:20
@donaldgray donaldgray changed the base branch from main to develop January 22, 2024 10:39
@JackLewis-digirati JackLewis-digirati changed the title initial commit adding EF details for the new tables adding Entity Framework details for the new tables Jan 22, 2024
src/protagonist/DLCS.Model/Assets/Asset.cs Outdated Show resolved Hide resolved
/// <summary>
/// The custom policy
/// </summary>
public string PolicyData { get; set; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this will always be a JSON object do we want to convert it on the way in + out to make it easier to use without deserializing it each time?

e.g.

public class DeliveryChannelPolicy
{
  public IPolicyData PolicyData { get; set; }
}

// concrete classes
public class AVPolicyData : IPolicyData {
  public string[] KnownPolicyNames { get; set; }
}

public class ThumbnailPolicyData : IPolicyData {
  public Sizes[] Sizes { get; set; }
}

public class ImagePolicyData : IPolicyData {}

Not sure what those classes would look like so might be something that can be added later.

src/protagonist/DLCS.Repository/DlcsContext.cs Outdated Show resolved Hide resolved
@JackLewis-digirati JackLewis-digirati changed the title adding Entity Framework details for the new tables Adding Entity Framework details for the new tables Jan 29, 2024
@JackLewis-digirati JackLewis-digirati merged commit 68aa0ef into develop Jan 30, 2024
9 checks passed
@JackLewis-digirati JackLewis-digirati deleted the feature/deliveryChannelDb branch January 30, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify DB Schema: add tables for delivery channels
2 participants