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("Template")]
    public class Template
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Int16 TemplateID { get; set; }

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

        [Required]
        [StringLength(1)]
        public string TemplateType { get; set; }

        [Required] 
        public string TemplateHTML { get; set; }

        [Required]
        [StringLength(100)]
        public string RefTableName { get; set; }

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

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

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

        //[ForeignKey("LookupParamID")]
        public int? LanguageID { get; set; }
         
        //public virtual LookupParam Language { get; set; }

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

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

        [Required]
        [Column(TypeName = "datetime2")]
        public DateTime CreatedDateTime { get; set; }

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

        [Required]
        [Column(TypeName = "datetime2")]
        public DateTime LastUpdatedDateTime { get; set; }
         

    }
}
