using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Sqler.Menu
{


    [System.ComponentModel.DataAnnotations.Schema.Table("Sqler_Menu")]
    public class MenuEntity
    {
        /// <summary>
        /// [[AutoTemp: {
        /// 
        ///  "idField": "id",
        ///  "pidField": "pid",
        ///  "treeField": "title",
        ///  "rootPidValue": 0,
        ///  "listConfig": {"defaultSort":[{"field":"sortIndex","asc":true}]}
        ///  
        /// } ]]
        /// 
        /// [[AutoTemp_Field: {  "list_config": {"width":250} } ]]
        /// </summary>
        public string title { get; set; }


        /// <summary>
        /// [[AutoTemp_Field: {
        ///  "list_config": {"width":80}
        /// } ]]
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int id { get; set; }
        /// <summary>
        /// [[AutoTemp_Field:{  "list_config": {"width":80}     } ]]
        /// </summary>
        public int? pid { get; set; }


        /// <summary>
        /// [[AutoTemp_Field:{  "list_config": {"width":100}     } ]]
        /// </summary>
        public bool? enabled { get; set; }

        /// <summary>
        /// [[AutoTemp_Field: { "list_config": {"width":80}  } ]]
        /// </summary>
        public int? sortIndex { get; set; }

        /// <summary>
        /// [[AutoTemp_Field: { "list_config": {"width":300} } ]]
        /// </summary>
        public string url { get; set; }

        [System.ComponentModel.DataAnnotations.Schema.Column(TypeName = "text")]
        public string extra { get; set; }
    }


}
