using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LHDN.CRM.Models.Models
{
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;

    [Table("Ref_Kategori2")]
    public class SubKategori
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Kategori2ID { get; set; }

        [Required]
        [StringLength(250)]
        public string Kategori2Name { get; set; }

        [StringLength(250)]
        public string DispositionCode2 { get; set; }

        public int Kategori1ID { get; set; }

        [ForeignKey("Kategori1ID")]
        private  MainKategori MainKategori { get; set; }


        [Required]
        public bool IsActive { get; set; }

        [Required]
        [StringLength(255)]
        public string CreatedBy { get; set; }

        [Required]
        public DateTime CreatedDatetime { get; set; }

        [Required]
        [StringLength(255)]
        public string LastUpdatedBy { get; set; }

        [Required]
        public DateTime LastUpdatedDatetime { get; set; }

        public virtual ICollection<InnerSubKategori> InnerSubKategori { get; set; }
    }
}
