using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using System.Text.Json.Serialization;
using TEAMModelOS.SDK.Context.Attributes.Azure;
using TEAMModelOS.SDK.DI;

namespace TEAMModelOS.SDK.Models
{
    /// <summary>
    ///Teaching materials 教学材料 --- 知识点，知识块
    /// </summary>    
    public class Knowledge: CosmosEntity
    {
        public Knowledge()
        {
            pk = "Knowledge";
            points = new List<string>();
        }
        
        /// <summary>
        /// 标记为知识块，0=知识块 ，1 知识点
        /// </summary>        
        [Required(ErrorMessage = "{0} 必须填写")]
        public int type { get; set; } = 0;
        /// <summary>
        /// 名称
        /// </summary>
        
        [Required(ErrorMessage = "{0} 必须填写")]
        public string name { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        
        [Required(ErrorMessage = "{0} 必须填写")]
        public string alias { get; set; }

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

       


        
        [Required(ErrorMessage = "{0} 必须填写")]
        public int order { get; set; }

        /// <summary>
        /// 删除状态0 删除 1 有效
        /// </summary>
        
        [Required(ErrorMessage = "{0} 必须填写")]
        public int status { get; set; } = 1;

        /// <summary>
        /// 知识点 id
        /// </summary>
        
        [Required(ErrorMessage = "{0} 必须填写")]
        public List<string> points { get; set; }


        /// <summary>
        ///  来自于标准表 Rowkey
        /// </summary>
        
/*        [Required(ErrorMessage = "{0} 必须填写")]
        public string knowledgeId { get; set; }*/

        /// <summary>
        /// 0 标准，1自建，2.....
        /// </summary>

        [Required(ErrorMessage = "{0} 必须填写")]
        public int source { get; set; }

        /// <summary>
        /// 学段 私有的没有学段
        /// </summary>
        ///[Required(ErrorMessage = "{0} 必须填写")]
        
        public string periodId { get; set; }
/*        public int ownCount { get; set; }
        public int openCount { get; set; }*/
    }
}
