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

namespace TEAMModelOS.SDK.Models.Cosmos.Common
{
    /// <summary>
    /// 课纲节点父类
    /// </summary>
    public  class Snode
    {  
        /// <summary>
        /// 试题 ，试卷，内容资源，外部链接（只有link,和name）,
        /// </summary>
        public int type { get; set; }
        public string title { get; set; }

    }
    /// <summary>
    /// 分支节点
    /// </summary>
    public class Tnode : Snode
    {
        [Required(ErrorMessage = "{0} 必须填写")]

        public string id { get; set; } /// <summary>
                                       /// 父级
                                       /// </summary>
        [Required(ErrorMessage = "{0} 必须填写")]

        public string pid { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        [Required(ErrorMessage = "{0} 必须填写")]

        public int order { get; set; }
        //public List<string> points { get; set; } = new List<string> { "" };
        public List<Rnode> rnodes { get; set; } = new List<Rnode>();
        public List<string> cids { get; set; } = new List<string>();
        //public string code { get; set; }

    }
    /// <summary>
    /// 资源节点
    /// </summary>
    public class Rnode : Snode
    {
        public string id { get; set; }
        public string code { get; set; }
        public List<string> link { get; set; }
    }
}
