Files
slp-modular-cms/src/SlpModularCms.Modules.Media/MediaLibraryOptions.cs
T

27 lines
1.5 KiB
C#

namespace SlpModularCms.Modules.Media;
/// <summary>Settings of the library's own tables (<c>Media:Library:*</c>). Everything is off by default: a deploy of the code alone only adds the empty tables.</summary>
public class MediaLibraryOptions
{
public const string SectionName = "Media:Library";
/// <summary>
/// Copy the photos and uses of the modules into the library's tables once at start-up and verify the copy
/// (<c>Media__Library__CopyOnStartup=true</c>). Safe to repeat: the copy mirrors the source. Never touches the modules' own data.
/// </summary>
public bool CopyOnStartup { get; set; }
/// <summary>
/// Write-through (phase 2, step A, <c>Media__Library__DualWrite=true</c>): after every change a module saved to its own tables,
/// the library tables are mirrored too. Off by default; the modules' own tables stay the truth.
/// </summary>
public bool DualWrite { get; set; }
/// <summary>
/// Where the library screen reads the photos from (phase 2, step C, <c>Media__Library__ReadFromLibrary</c>): <c>Off</c> (the
/// module's own tables, the default), <c>Compare</c> (still those, but differences with the library tables are logged and
/// shown by <c>GET media-library/read-check</c>) or <c>On</c> (the library tables; needs <c>DualWrite</c>).
/// </summary>
public SlpModularCms.Core.Media.Library.MediaReadMode ReadFromLibrary { get; set; } = SlpModularCms.Core.Media.Library.MediaReadMode.Off;
}