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

/// <summary>
/// 사용자단 회원 등급 조건 세부 정보
/// </summary>
namespace bitforum.Models.User
{
    [Table("MemberGrade")]
    [Comment("회원 등급")]
    [Index(nameof(KorName), Name = "IX_MemberGrade_KorName", IsUnique = true)]
    [Index(nameof(EngName), Name = "IX_MemberGrade_EngName", IsUnique = true)]
    public class MemberGrade
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Comment("PK")]
        public int ID { get; set; }

        [Required]
        [MaxLength(120)]
        [Comment("한글 명")]
        public string KorName { get; set; }

        [Required]
        [MaxLength(120)]
        [Comment("영문 명")]
        public string EngName { get; set; }

        [MaxLength(1000)]
        [Comment("설명")]
        public string? Description { get; set; } = null;

        [Required]
        [Comment("순서")]
        public short Order { get; set; } = 0;

        [DataType(DataType.ImageUrl)]
        [Comment("이미지")]
        public string? Image { get; set; } = null;

        [Required]
        [Comment("최소 경험치(Exp)")]
        public int RequiredExp { get; set; } = 0;

        [Required]
        [Comment("최소 코인(Coin)")]
        public int RequiredCoin { get; set; } = 0;

        [Comment("사용 여부")]
        public bool IsActive { get; set; } = false;

        [Comment("수정 일시")]
        public DateTime? UpdatedAt { get; set; } = null;

        [Required]
        [Comment("등록 일시")]
        public DateTime CreatedAt { get; set; }
    }
}
