Adding of archive items is mostly operational. Need to handle file upload

This commit is contained in:
Vincent Allen
2025-07-29 16:16:42 -04:00
parent 13c45e8459
commit 6475a28263
158 changed files with 2628 additions and 801 deletions

View File

@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OpenArchival.Core;
public class ArchiveItem
{
public required Category Category { get; set; }
public required string ItemTitle { get; set; }
public string? Description { get; set; }
public string? StorageLocation { get; set; }
public string? ArtifactType { get; set; }
public List<string>? Tags { get; set; }
public List<string>? ListedNames { get; set; }
public List<DateTime>? AssociatedDates { get; set; }
public List<string>? Defects { get; set; }
public List<string>? RelatedArtifacts { get; set; }
/// <summary>
/// TODO: Implement
/// </summary>
public List<string>? Files { get; set; }
public bool IsPublic { get; set; } = true;
}

View File

@@ -0,0 +1,23 @@
using System.Runtime.CompilerServices;
namespace OpenArchival.Core;
public class Category
{
public int CategoryId { get; set; }
public required string CategoryName { get; set; }
public required string FieldSeparator { get; set; }
public required string[] FieldNames { get; set; }
public required string[] FieldDescriptions { get; set; }
public IEnumerable<KeyValuePair<string, string>> FieldsIterator
{
get
{
for (int index = 0; index < FieldNames.Length; ++index)
{
yield return new KeyValuePair<string, string>(FieldNames[index], FieldDescriptions[index]);
}
}
}
}

View File

@@ -0,0 +1,10 @@
namespace OpenArchival.Core;
public class CategoryFieldOption
{
public required int CategoryId { get; set; }
public required int FieldNumber { get; set; }
public required string Value { get; set; }
public required string Name { get; set; }
public string? Description { get; set; }
}

View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OpenArchival.Database;
public class FileInfo
{
public int Id { get; set; }
public required string Filename { get; set; }
public required string Path { get; set; }
}