diff --git a/DysonNetwork.Sphere/Account/Account.cs b/DysonNetwork.Sphere/Account/Account.cs index 0a0c3b1..eb93ea3 100644 --- a/DysonNetwork.Sphere/Account/Account.cs +++ b/DysonNetwork.Sphere/Account/Account.cs @@ -65,7 +65,8 @@ public class Profile : ModelBase public Instant? Birthday { get; set; } public Instant? LastSeenAt { get; set; } - [Column(TypeName = "jsonb")] public BadgeReferenceObject? ActiveBadge { get; set; } = null!; + [Column(TypeName = "jsonb")] public VerificationMark? Verification { get; set; } + [Column(TypeName = "jsonb")] public BadgeReferenceObject? ActiveBadge { get; set; } public int Experience { get; set; } = 0; [NotMapped] public int Level => Leveling.ExperiencePerLevel.Count(xp => Experience >= xp) - 1; diff --git a/DysonNetwork.Sphere/Account/VerificationMark.cs b/DysonNetwork.Sphere/Account/VerificationMark.cs new file mode 100644 index 0000000..4f0e6c3 --- /dev/null +++ b/DysonNetwork.Sphere/Account/VerificationMark.cs @@ -0,0 +1,25 @@ +using System.ComponentModel.DataAnnotations; + +namespace DysonNetwork.Sphere.Account; + +/// +/// The verification info of a resource +/// stands, for it is really an individual or organization or a company in the real world. +/// Besides, it can also be use for mark parody or fake. +/// +public class VerificationMark +{ + public VerificationMarkType Type { get; set; } + [MaxLength(1024)] public string? Title { get; set; } + [MaxLength(8192)] public string? Description { get; set; } + [MaxLength(1024)] public string? VerifiedBy { get; set; } +} + +public enum VerificationMarkType +{ + Official, + Individual, + Organization, + Government, + Creator +} \ No newline at end of file diff --git a/DysonNetwork.Sphere/Publisher/Publisher.cs b/DysonNetwork.Sphere/Publisher/Publisher.cs index cce05e0..84efcf5 100644 --- a/DysonNetwork.Sphere/Publisher/Publisher.cs +++ b/DysonNetwork.Sphere/Publisher/Publisher.cs @@ -29,6 +29,8 @@ public class Publisher : ModelBase, IIdentifiedResource [Column(TypeName = "jsonb")] public CloudFileReferenceObject? Picture { get; set; } [Column(TypeName = "jsonb")] public CloudFileReferenceObject? Background { get; set; } + + [Column(TypeName = "jsonb")] public Account.VerificationMark? Verification { get; set; } [JsonIgnore] public ICollection Posts { get; set; } = new List(); [JsonIgnore] public ICollection Collections { get; set; } = new List(); diff --git a/DysonNetwork.Sphere/Realm/Realm.cs b/DysonNetwork.Sphere/Realm/Realm.cs index dd8e7f5..21ea20f 100644 --- a/DysonNetwork.Sphere/Realm/Realm.cs +++ b/DysonNetwork.Sphere/Realm/Realm.cs @@ -26,6 +26,8 @@ public class Realm : ModelBase, IIdentifiedResource [Column(TypeName = "jsonb")] public CloudFileReferenceObject? Picture { get; set; } [Column(TypeName = "jsonb")] public CloudFileReferenceObject? Background { get; set; } + + [Column(TypeName = "jsonb")] public Account.VerificationMark? Verification { get; set; } [JsonIgnore] public ICollection Members { get; set; } = new List(); [JsonIgnore] public ICollection ChatRooms { get; set; } = new List();