diff options
author | vman <public@vaughnnugent.com> | 2022-11-18 16:08:51 -0500 |
---|---|---|
committer | vman <public@vaughnnugent.com> | 2022-11-18 16:08:51 -0500 |
commit | 526c2364b9ad685d1c000fc8a168bf1305aaa8b7 (patch) | |
tree | a2bc01607320a6a75e1a869d5bd34e79fd63c595 /VNLib.Plugins.Essentials.Content.Routing/Model/Route.cs | |
parent | 2080400119be00bdc354f3121d84ec2f89606ac7 (diff) |
Add project files.
Diffstat (limited to 'VNLib.Plugins.Essentials.Content.Routing/Model/Route.cs')
-rw-r--r-- | VNLib.Plugins.Essentials.Content.Routing/Model/Route.cs | 47 |
1 files changed, 47 insertions, 0 deletions
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; } + + /// <summary> + /// The processing arguments that match the route + /// </summary> + [NotMapped] + public FileProcessArgs MatchArgs + { + get + { + return new FileProcessArgs() + { + Alternate = this.Alternate, + Routine = (FpRoutine) Routine + }; + } + } + } +} |