- aggiunto un po di tutto comeil progetto del prof
This commit is contained in:
2018-09-14 19:38:02 +02:00
parent 05ce84a07a
commit c807c474c4
9698 changed files with 748393 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
using LinqToDB.Mapping;
using System;
namespace SeniorAssistant.Models
{
public class Heartbeat : IHasTime
{
[PrimaryKey]
[NotNull]
public string Username { get; set; }
[PrimaryKey]
[NotNull]
public DateTime Time { get; set; }
[Association(ThisKey = nameof(Username), OtherKey = nameof(User.Username), CanBeNull = false)]
public User user { get; set; }
public double Value { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
using System;
namespace SeniorAssistant.Models
{
public interface IHasTime : IHasUsername
{
DateTime Time { get; set; }
}
}

View File

@@ -0,0 +1,7 @@
namespace SeniorAssistant.Models
{
public interface IHasUsername
{
string Username { get; set; }
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace SeniorAssistant.Models
{
public interface IMenuItem
{
string Text { get; set; }
}
public class MenuItem : IMenuItem
{
public MenuItem(string text) : this(text, "#") { }
public MenuItem(string text, string href)
{
Text = text;
HRef = href;
}
public string Text { get; set; }
public string HRef { get; set; }
}
public class SubMenu : IMenuItem
{
public string Text { get; set; }
public IEnumerable<MenuItem> Items { get; set; }
}
}

View File

@@ -0,0 +1,14 @@
using LinqToDB.Mapping;
namespace SeniorAssistant.Models
{
public class User : IHasUsername
{
[PrimaryKey]
[NotNull]
public string Username { get; set; }
[NotNull]
public string Name { get; set; }
}
}