using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using TEAMModelOS.SDK.Models.Cosmos.Common;

namespace TEAMModelOS.SDK.Models
{
    /// <summary>
    /// 教研中心技能点
    /// </summary>
    public  class Ability :CosmosEntity
    {
        /// <summary>
        ///新建字段 维度 对应 原来的 subjectId 学科
        /// </summary>
        public string dimension { get; set; }
        /// <summary>
        /// 标号 A1  A2 A3....
        /// </summary>
        public string no { get; set; }
        /// <summary>
        /// 能力点数量
        /// </summary>
        public int abilityCount { get; set; }
        /// <summary>
        /// 学时
        /// </summary>
        public int hour { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int status { get; set; } = 1;
        /// <summary>
        /// 册别name
        /// </summary>
        [Required(ErrorMessage = "{0} 必须填写")]
        public string name { get; set; }
        /// <summary>
        /// 创建者醍摩豆id
        /// </summary>
        public string creatorId { get; set; }
        public string creatorName { get; set; }
        /// <summary>
        /// 学校编码
        /// </summary>
       // [Required(ErrorMessage = "school 必须设置")]
        public string school { get; set; }
        /// <summary>
        /// school|private
        /// </summary>
        [Required(ErrorMessage = "scope 必须设置")]
        public string scope { get; set; }
        /// <summary>
        /// 原来的  syllabusIds
        /// </summary>
        public List<string> abilityTaskIds { get; set; } = new List<string>();
        public List<AbilityAuth> auth { get; set; } = new List<AbilityAuth>();
        /// <summary>
        /// 评论/话题的统一id,用于被关联
        /// </summary>
        public string comid { get; set; }
        public string desc { get; set; }
        public string env { get; set; }
        public string sug { get; set; }
        public List<AbilityStds> stds { get; set; } = new List<AbilityStds>();
        /// <summary>
        ///自测练习题试卷 blob地址
        /// </summary>
        public string blob { get; set; }
        /// <summary>
        ///选修false  必修true
        /// </summary>
        public bool compulsory { get; set; } =false;
        public string standard { get; set; }
    }
    public class AbilityAuth
    {
        public string tmdid { get; set; }
        public string tmdname { get; set; }
    }

    public class AbilityStds
    {
        public string std { get; set; }
        public int order { get; set; }
        public string id { get; set; }
        public List<AbilityStdTask> task { get; set; }
    }
    public class AbilityStdTask
    {
        public string id { get; set; }
        public string stddesc { get; set; }
        public List<AbilityStdTitle> titles { get; set; } = new List<AbilityStdTitle>();
    }
    public class AbilityStdTitle { 
        public string id { get; set; }
        public string title { get; set; }
        public string value { get; set; }
    }
}
