Working on Admin page modal
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
namespace HopFrame.Database.Attributes;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property)]
|
||||
public sealed class ListingPropertyAttribute : Attribute;
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
using HopFrame.Database.Attributes;
|
||||
|
||||
namespace HopFrame.Database.Models;
|
||||
|
||||
@@ -9,7 +10,7 @@ public class Permission {
|
||||
[Key, Required, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; init; }
|
||||
|
||||
[Required, MaxLength(255)]
|
||||
[Required, MaxLength(255), ListingProperty]
|
||||
public string PermissionName { get; set; }
|
||||
|
||||
[Required]
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using HopFrame.Database.Attributes;
|
||||
|
||||
namespace HopFrame.Database.Models;
|
||||
|
||||
public class PermissionGroup : IPermissionOwner {
|
||||
|
||||
[Key, Required, MaxLength(50)]
|
||||
[Key, Required, MaxLength(50), ListingProperty]
|
||||
public string Name { get; init; }
|
||||
|
||||
[Required, DefaultValue(false)]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
using HopFrame.Database.Attributes;
|
||||
|
||||
namespace HopFrame.Database.Models;
|
||||
|
||||
@@ -8,7 +9,7 @@ public class User : IPermissionOwner {
|
||||
[Key, Required, MinLength(36), MaxLength(36)]
|
||||
public Guid Id { get; init; }
|
||||
|
||||
[MaxLength(50)]
|
||||
[MaxLength(50), ListingProperty]
|
||||
public string Username { get; set; }
|
||||
|
||||
[Required, MaxLength(50), EmailAddress]
|
||||
|
||||
Reference in New Issue
Block a user