Projektdateien hinzufügen.

This commit is contained in:
2026-01-21 10:50:17 +01:00
parent 5fa6969fb3
commit 0709c9fe05
8 changed files with 950 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
// Documents.cs
namespace EPI2CrewbrainFile
{
using System;
using System.Collections.Generic;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
public partial class Documents
{
[JsonProperty("ID")]
public long Id { get; set; }
[JsonProperty("DokumentID")]
public long DokumentId { get; set; }
[JsonProperty("Zugehoerigkeit")]
public string Zugehoerigkeit { get; set; }
[JsonProperty("ZugehoerigkeitID")]
public long ZugehoerigkeitId { get; set; }
[JsonProperty("Sichtbarkeit")]
public long Sichtbarkeit { get; set; }
[JsonProperty("AngelegtID")]
public long AngelegtId { get; set; }
[JsonProperty("AngelegtDatum")]
public DateTimeOffset AngelegtDatum { get; set; }
[JsonProperty("GeaendertID")]
public long GeaendertId { get; set; }
[JsonProperty("GeaendertDatum")]
public DateTimeOffset GeaendertDatum { get; set; }
[JsonProperty("Geloescht")]
public object Geloescht { get; set; }
[JsonProperty("Dateiname")]
public string Dateiname { get; set; }
[JsonProperty("Dateiendung")]
public string Dateiendung { get; set; }
[JsonProperty("Groesse")]
public long Groesse { get; set; }
[JsonProperty("FremdKundenID")]
public long FremdKundenId { get; set; }
[JsonProperty("URL")]
public Uri Url { get; set; }
public static List<Documents> FromJson(string json) =>
JsonConvert.DeserializeObject<List<Documents>>(json, Converter.Settings);
}
public static class Serialize
{
public static string ToJson(this List<Documents> self) =>
JsonConvert.SerializeObject(self, Converter.Settings);
}
internal static class Converter
{
public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
{
MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
DateParseHandling = DateParseHandling.None,
Converters =
{
new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
},
};
}
}