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

namespace TEAMModelOS.SDK.Models.Cosmos.Common
{
    /// <summary>
    /// 课纲节点父类
    /// </summary>
    public  class Snode
    {
 
        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>();
        /// <summary>
        /// 谁创建的该节点
        /// </summary>
        public string creatorId { get; set; }
        public long updateTime { get; set; }
        //public string code { get; set; }

    }
    /// <summary>
    /// 资源节点
    /// </summary>
    public class Rnode : Snode
    {       
        /// <summary>
        /// item 试题 paper试卷 link外部链接 audio 音频，video 视频 ，doc文档，image图片，other 其他，res教材，thum缩略图
        /// </summary>
        public string type { get; set; }
        public string id { get; set; }
        public string code { get; set; }
        public string scope { get; set; }
        /// <summary>
        /// blob 容器名
        /// </summary>
        public string cntr { get; set; } 
        /// <summary>
        /// 存放地址 外部链接是绝对地址有http   blob是相对地址
        /// </summary>
        public List<string> link { get; set; }
    }
}
