using System.ComponentModel.DataAnnotations;

namespace planli.backend.DTOs
{
    public class UserRegisterDto
    {
        [Required]
        public required string Name { get; set; }

        [Required]
        [EmailAddress]
        public required string Email { get; set; }

        [Required]
        [MinLength(8)]
        public required string Password { get; set; }
    }

    public class UserLoginDto
    {
        [Required]
        [EmailAddress]
        public required string Email { get; set; }

        [Required]
        public required string Password { get; set; }
    }

    /// <summary>
    /// Returned by login, register, and GET /me.
    /// Tokens are never sent to the client — they live in HttpOnly cookies.
    /// </summary>
    public class MeResponseDto
    {
        public int    Id    { get; set; }
        public string Name  { get; set; } = "";
        public string Email { get; set; } = "";
    }
}
