using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace FMSAdmin.Entities {
    public enum ShortcutType {
        대시보드메뉴 = 0,
        하단메뉴,
    }

    public class MobileShortcut {
        public MobileShortcut() {
        }
        [DisplayName("ID"), Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int MobileShortcutId { get; set; }

        [Display(Name = "사용자 고유번호")]
        [StringLength(24)]
        public string UserId { get; set; }

        [Display(Name = "사이트맵 ID")]
        public int SitemapId { get; set; }

        [Display(Name = "단축메뉴 구분")]
        public ShortcutType Type { get; set; }

        [DisplayName("아이콘")]
        public string Icon { get; set; }

        [DisplayName("정렬순서")]
        public int Position { get; set; }

        [DisplayName("삭제여부"), Description("삭제여부가 있어야 사용자의 단축메뉴가 최초 저장되었는지를 판단 가능하다.")]
        public bool IsDelete { get; set; }

        [DisplayName("등록일")]
        public DateTime? Created { get; set; }

        [DisplayName("수정일")]
        public DateTime? Updated { get; set; }

        [ForeignKey("UserId")]
        public virtual CmUser CmUser { get; set; }

        [ForeignKey("SitemapId")]
        public virtual Sitemap Sitemap { get; set; }
    }
}
