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

namespace TEAMModelOS.SDK.Models.Cosmos.Common
{
    public class Volume: CosmosEntity
    { 
        /// <summary>
        /// 0默认教学课纲的册别 1个人或单独的专题课纲册别 2，系统课纲
        /// </summary>
       // public int type { get; set; }
        /// <summary>
        /// 学段
        /// </summary>

        public string periodId { get; set; }


        /// <summary>
        /// 学科
        /// </summary>

        public string subjectId { get; set; }


        /// <summary>
        /// 年级
        /// </summary>

        public int gradeId { get; set; }


        /// <summary>
        /// 学期code
        /// </summary>

        public string semesterId { get; set; }


        /// <summary>
        /// 状态
        /// </summary>

        public int status { get; set; } = 1;


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


        /// <summary>
        /// 册别code
        /// </summary>
      //  public string volumeCode { get; set; }

        /// <summary>
        /// 创建者醍摩豆id
        /// </summary>
       
        public string creatorId { get; set; }

        /// <summary>
        /// 共编使用者 的醍摩豆id
        /// </summary>
       // public List<string> editors { get; set; }

        //public int resourceCount { get; set; }
        //public int itemCount { get; set; }
        /// <summary>
        /// 学校编码
        /// </summary>
        [Required(ErrorMessage = "school 必须设置")]
        public string school { get; set; }
       // public bool repeat { get; set; }
        /// <summary>
        /// school|private
        /// </summary>
        [Required(ErrorMessage = "scope 必须设置")]
        public string scope { get; set; }
        public List<SyllabusAuth> auth { get; set; } = new List<SyllabusAuth>();
    }

    /// <summary>
    /// 只要创建课纲的creatorId 才能编辑课纲的分享，共编权限 25600 74200  27500 2000
    /// ,共编者 谁创建的节点只能谁删除，而且删除时能删除子节点(包含不是自己创建的)。
    /// </summary>
    public class SyllabusAuth
    {
        public string tmdid { get; set; }
        public string name { get; set; }
        public bool coedit { get; set; }
        public bool share { get; set; }
        /// <summary>
        ///分享的节点 all  或者節點id
        /// </summary>
        public List<string> snodes { get; set; } = new List<string>();
    }
}
