WIP
This commit is contained in:
33
Yavsc/Models/Access/Ban.cs
Normal file
33
Yavsc/Models/Access/Ban.cs
Normal file
@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Access
|
||||
{
|
||||
public class Ban : IBaseTrackedEntity
|
||||
{
|
||||
public DateTime DateCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public DateTime DateModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
public string UserCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string UserModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
}
|
||||
}
|
18
Yavsc/Models/Access/BanByEmail.cs
Normal file
18
Yavsc/Models/Access/BanByEmail.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Access
|
||||
{
|
||||
public class BanByEmail
|
||||
{
|
||||
[Required]
|
||||
public long BanId { get; set; }
|
||||
|
||||
[ForeignKey("BanId")]
|
||||
public virtual Ban UserBan { get; set; }
|
||||
|
||||
[Required]
|
||||
public string email { get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models.Access
|
||||
{
|
||||
@ -7,10 +8,14 @@ namespace Yavsc.Models.Access
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public string UserId { get; set; }
|
||||
|
||||
[Required]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKey("OwnerId")]
|
||||
[ForeignKey("OwnerId"),JsonIgnore]
|
||||
public virtual ApplicationUser Owner { get; set; }
|
||||
}
|
||||
|
||||
|
@ -258,5 +258,8 @@ namespace Yavsc.Models
|
||||
|
||||
public DbSet<Form> Form { get; set; }
|
||||
|
||||
public DbSet<Ban> Banlist { get ; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user