21 lines
766 B
C#
21 lines
766 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Managing.Infrastructure.Databases.PostgreSql.Entities;
|
|
|
|
[Table("Users")]
|
|
[Index(nameof(Name), IsUnique = true)]
|
|
public class UserEntity
|
|
{
|
|
[Key] public int Id { get; set; }
|
|
[Required] [MaxLength(255)] public required string Name { get; set; }
|
|
[MaxLength(255)] public string? AgentName { get; set; }
|
|
public string? AvatarUrl { get; set; }
|
|
public string? TelegramChannel { get; set; }
|
|
public string? OwnerWalletAddress { get; set; }
|
|
public bool IsAdmin { get; set; }
|
|
|
|
// Navigation properties
|
|
public virtual ICollection<AccountEntity> Accounts { get; set; } = new List<AccountEntity>();
|
|
} |