Entities vereinfacht (kein Entity Developer mehr)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using FoodsharingSiegen.Contracts.Helper;
|
||||
|
||||
@@ -7,10 +8,30 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
/// <summary>
|
||||
/// The user class (a. beging, 06.04.2022)
|
||||
/// </summary>
|
||||
public partial class User
|
||||
public class User
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the created (ab)
|
||||
/// </summary>
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the encrypted password (ab)
|
||||
/// </summary>
|
||||
public string EncryptedPassword { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the force logout (ab)
|
||||
/// </summary>
|
||||
public bool ForceLogout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the groups (ab)
|
||||
/// </summary>
|
||||
public string Groups { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the groups list (ab)
|
||||
/// </summary>
|
||||
@@ -27,6 +48,26 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
set => Groups = string.Join(",", value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the id (ab)
|
||||
/// </summary>
|
||||
[Key] public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the interactions (ab)
|
||||
/// </summary>
|
||||
public IList<Interaction> Interactions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the mail (ab)
|
||||
/// </summary>
|
||||
public string Mail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the name (ab)
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the password (ab)
|
||||
/// </summary>
|
||||
@@ -37,6 +78,16 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
set => EncryptedPassword = Cryptor.Encrypt(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the type (ab)
|
||||
/// </summary>
|
||||
public UserType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the verified (ab)
|
||||
/// </summary>
|
||||
public bool Verified { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Method Clone
|
||||
|
||||
Reference in New Issue
Block a user