back photo + event tags and persons
This commit is contained in:
49
back/DataModels/PersonModel.cs
Normal file
49
back/DataModels/PersonModel.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace back.DataModels;
|
||||
|
||||
[Table("Persons")]
|
||||
public class PersonModel
|
||||
{
|
||||
[Key]
|
||||
public string Id { get; set; }
|
||||
[Required, MaxLength(100)]
|
||||
public string? Name { get; set; }
|
||||
public string? ProfilePicture { get; set; }
|
||||
public string? Avatar { get; set; }
|
||||
public SocialMedia? SocialMedia { get; set; }
|
||||
[MaxLength(250)]
|
||||
public string? Bio { get; set; } // Optional field for a short biography or description
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public DateTime UpdatedAt { get; set; }
|
||||
|
||||
public PersonModel(string id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public PersonModel(string id, string name, string? profilePicture = null, string? avatar = null, SocialMedia? socialMedia = null)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
ProfilePicture = profilePicture;
|
||||
Avatar = avatar;
|
||||
SocialMedia = socialMedia;
|
||||
}
|
||||
}
|
||||
|
||||
[Table("SocialMediaLinks")]
|
||||
public class SocialMedia
|
||||
{
|
||||
public string? Facebook { get; set; }
|
||||
public string? Instagram { get; set; }
|
||||
public string? Twitter { get; set; }
|
||||
public string? BlueSky { get; set; }
|
||||
public string? Tiktok { get; set; }
|
||||
public string? Linkedin { get; set; }
|
||||
public string? Pinterest { get; set; }
|
||||
public string? Discord { get; set; }
|
||||
public string? Reddit { get; set; }
|
||||
public string? Other { get; set; }
|
||||
}
|
Reference in New Issue
Block a user