save
This commit is contained in:
@@ -23,9 +23,4 @@
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Abstract\" />
|
||||
<Folder Include="Closed Concrete\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
using aeqw89.DataKeys;
|
||||
|
||||
namespace Beam.Models;
|
||||
|
||||
public class RelationTypes {
|
||||
public static DataKey<object> LinkTable => new DataKey<object>("rel:toc");
|
||||
public static DataKey<object> ArticleData => new DataKey<object>("rel:articleData");
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using aeqw89.DataKeys;
|
||||
using aeqw89.PersistentData;
|
||||
using Beam.Abstractions;
|
||||
|
||||
namespace Beam.Models;
|
||||
|
||||
public class ResourceDefinition {
|
||||
public required DataKey<ResourceDefinition> Key { get; init; }
|
||||
|
||||
public required MetaData Meta { get; init; }
|
||||
|
||||
/// <summary>Map of element name to extraction config. Keys must match ^[A-Za-z0-9_-]+$</summary>
|
||||
public required Table<IDataProvider> Elements { get; init; }
|
||||
|
||||
/// <summary>Minimum 1 item; polymorphic segments discriminated by "type".</summary>
|
||||
public required ILinkBuilder Url { get; init; }
|
||||
|
||||
/// <summary>Keys must match ^[A-Za-z0-9_-]+$</summary>
|
||||
public required Table<ResourceRelation> Relations { get; init; }
|
||||
|
||||
public class MetaData {
|
||||
public required string Name { get; init; }
|
||||
public required string Author { get; init; }
|
||||
public string? Description { get; init; }
|
||||
public string? ProjectUrl { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
using aeqw89.DataKeys;
|
||||
|
||||
namespace Beam.Models;
|
||||
|
||||
public class ResourceRelation {
|
||||
public required DataKey<ResourceDefinition> Key { get; init; }
|
||||
public required DataKey<object> RelationType { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user