2026-04-11 21:36:05 +02:00

30 lines
782 B
C#

using Microsoft.EntityFrameworkCore;
using OnlyPrompt.Backend.Database.Core;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace OnlyPrompt.Backend.Database.Models
{
[Index(nameof(Slug), IsUnique = true)]
public class UserProfileModel : EntityBase, IHasSlug
{
[MaxLength(100)]
public required string DisplayName { get; set; }
[MaxLength(ModelConstants.MaxSlugLength)]
[Column(TypeName = "citext")]
public required string Slug { get; set; }
[MaxLength(2000)]
public string? Bio { get; set; }
public required string AvatarUrl { get; set; }
[MaxLength(200)]
public string? Specialities { get; set; }
public virtual UserModel User { get; set; }
public bool IsPublic { get; set; } = false;
}
}