From 526c2364b9ad685d1c000fc8a168bf1305aaa8b7 Mon Sep 17 00:00:00 2001 From: vman Date: Fri, 18 Nov 2022 16:08:51 -0500 Subject: Add project files. --- .../Model/Route.cs | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 VNLib.Plugins.Essentials.Content.Routing/Model/Route.cs (limited to 'VNLib.Plugins.Essentials.Content.Routing/Model/Route.cs') diff --git a/VNLib.Plugins.Essentials.Content.Routing/Model/Route.cs b/VNLib.Plugins.Essentials.Content.Routing/Model/Route.cs new file mode 100644 index 0000000..9af42f1 --- /dev/null +++ b/VNLib.Plugins.Essentials.Content.Routing/Model/Route.cs @@ -0,0 +1,47 @@ +using System; +using System.ComponentModel.DataAnnotations.Schema; + +using Microsoft.EntityFrameworkCore; + +using VNLib.Plugins.Extensions.Data; + +namespace VNLib.Plugins.Essentials.Content.Routing.Model +{ + [Index(nameof(Id), IsUnique = true)] + internal class Route : DbModelBase + { + public override string Id { get; set; } + public override DateTime Created { get; set; } + public override DateTime LastModified { get; set; } + + public string Hostname { get; set; } + public string MatchPath { get; set; } + [Column("Privilage")] + public long _privilage + { + get => (long)Privilage; + set => Privilage = (ulong)value; + } + [NotMapped] + public ulong Privilage { get; set; } + + public string Alternate { get; set; } + public FpRoutine Routine { get; set; } + + /// + /// The processing arguments that match the route + /// + [NotMapped] + public FileProcessArgs MatchArgs + { + get + { + return new FileProcessArgs() + { + Alternate = this.Alternate, + Routine = (FpRoutine) Routine + }; + } + } + } +} -- cgit