[sharedlibrary] add client meta
[application] add gravatar command
This commit is contained in:
@ -34,6 +34,8 @@ namespace SharedLibraryCore.Database.Models
|
||||
|
||||
public string Password { get; set; }
|
||||
public string PasswordSalt { get; set; }
|
||||
// list of meta for the client
|
||||
public virtual ICollection<EFMeta> Meta { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public virtual string Name
|
||||
|
31
SharedLibraryCore/Database/Models/EFMeta.cs
Normal file
31
SharedLibraryCore/Database/Models/EFMeta.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
namespace SharedLibraryCore.Database.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// This class encapsulates any meta fields as a simple string
|
||||
/// </summary>
|
||||
public class EFMeta : SharedEntity
|
||||
{
|
||||
[Key]
|
||||
public int MetaId { get; set; }
|
||||
[Required]
|
||||
public DateTime Created { get; set; } = DateTime.UtcNow;
|
||||
[Required]
|
||||
public DateTime Updated { get; set; } = DateTime.UtcNow;
|
||||
[Required]
|
||||
public int ClientId { get; set; }
|
||||
[ForeignKey("ClientId")] // this is the client that the meta belongs to
|
||||
public virtual EFClient Client { get; set; }
|
||||
[Required]
|
||||
[MinLength(3)]
|
||||
public string Key { get; set; }
|
||||
[Required]
|
||||
public string Value { get; set; }
|
||||
public string Extra { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user