using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Text.Json.Serialization;

namespace User.Insight.Tracker.DataContracts
{
    [ExcludeFromCodeCoverage]
    public class AddUpdateUserRequest
    {
        // Optional for create, required for update scenarios; nullable avoids under-posting issues.
        public int? UserId { get; set; }

        // Mark required to ensure model binding fails on missing or default values.
        [Required]
        [JsonRequired]
        public string UserFirstName { get; set; }

        [Required]
        [JsonRequired]
        public string UserLastName { get; set; }

        [Required]
        [JsonRequired]
        public string UserEmail { get; set; }

        [Required]
        [JsonRequired]
        public string UserStatus { get; set; }

        // Value type marked as required to avoid default 0 under-posting.    
        public int? UserRoleId { get; set; }
    }
}