using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace AfRApay.Web.Backend.Database.Tables;

[Table("Users")]
[Index(nameof(Nickname), IsUnique = true)]
public class User {
	[Column("ID")] [Key]                                        public long    Id                 { get; set; }
	[Column("Balance")] [Required]                              public long    Balance            { get; set; }
	[Column("Nickname", TypeName = "NVarChar(255)")] [Required] public string  Nickname           { get; set; } = null!;
	[Column("LastIdempotencyKey", TypeName = "NVarChar(255)")]  public string? LastIdempotencyKey { get; set; }
}
