using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
using TEAMModelOS.SDK.Context.Attributes.Azure;
using TEAMModelOS.SDK.DI;
using TEAMModelOS.SDK.Models.Cosmos.Common;
namespace TEAMModelOS.SDK.Models
{
    /// <summary>
    /// 教研中心技能节点
    /// </summary>
    public class AbilityTask : CosmosEntity
    {
        [Required(ErrorMessage = "{0} 必须填写")]
        public List<Tnode> children { get; set; }
        /// <summary>
        /// 原来为 volumeId  
        /// </summary>
        public string abilityId { get; set; }
        /// <summary>
        /// 校本课纲时传入 学校编码，私人课纲时传入醍摩豆ID
        /// </summary>
        public string codeval { get; set; }
        public List<NodeAuth> auth { get; set; } = new List<NodeAuth>();
        public string scope { get; set; }
        public string standard { get; set; }
    }
    /// <summary>
    /// 只要创建课纲的creatorId 才能编辑课纲的分享，共编权限 25600 74200  27500 2000
    /// ,共编者 谁创建的节点只能谁删除，而且删除时能删除子节点(包含不是自己创建的)。
    /// </summary>
    public class NodeAuth
    {
        public string tmdid { get; set; }
        public string tmdname { get; set; }
        /// <summary>
        /// 分享  type=coedit共编,share分享
        /// </summary>
        public string type { get; set; }
        /// <summary>
        /// 是否同意
        /// </summary>
        public int agree { get; set; } = 0;
    }
}
