using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace back.DataModels; [Table("Persons")] public class PersonModel { public 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; } [ForeignKey("SocialMediaId")] 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("SocialMedia")] public class SocialMedia { [Key] public string Id { get; set; } = Guid.NewGuid().ToString(); 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; } }