34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace back.DataModels;
|
|
|
|
[Table("SocialMedia")]
|
|
public partial class SocialMedia: IEquatable<SocialMedia>
|
|
{
|
|
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public string Id { get; set; } = null!;
|
|
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; }
|
|
public virtual ICollection<Person> People { get; set; } = [];
|
|
|
|
public override int GetHashCode() => HashCode.Combine(Id);
|
|
|
|
public override bool Equals(object? obj) => obj is SocialMedia otherEvent && Equals(otherEvent);
|
|
|
|
public bool Equals(SocialMedia? other)
|
|
{
|
|
if (other is null) return false;
|
|
if (ReferenceEquals(this, other)) return true;
|
|
return GetHashCode() == other.GetHashCode();
|
|
}
|
|
}
|