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

using TEAMModelOS.SDK.Context.Attributes.Azure;


namespace TEAMModelOS.SDK.Models
{
    /// <summary>
    /// 投票
    /// </summary>    
    public class Vote : CosmosEntity
    {
        public Vote()
        {
            pk = "Vote";
            options = new List<OptionsVote>();

        }

        /// <summary>
        /// 投票名称
        /// </summary>
        public string name { get; set; }
        public string school { get; set; }
        public string creatorId { get; set; }
        public int year { get; set; }
        public string progress { get; set; }
        public List<OptionsVote> options { get; set; }
        public bool secret { get; set; }
        public int selectMax { get; set; }
        public int stuCount { get; set; }
        public string scope { get; set; }
        public List<string> targetClassIds { get; set; }
        /// <summary>
        /// 发布模式 0 立即发布 1 定时
        /// </summary>
        public string publishModel { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        public long startTime { get; set; }
        public long createTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        public long endTime { get; set; }


        /// <summary>
        /// 投票描述
        /// </summary>
        public string description { get; set; }


        /*        /// <summary>
                /// 投票附件
                /// </summary>
                [ProtoMember(9)]
                public List<ProcessRes> resource { get; set; }
        */

        /// <summary>
        /// 状态 （100：待发布 200：已发布 300：已结束）
        /// </summary>
        public int status { get; set; }


        /*        /// <summary>
                /// 模式
                /// </summary>
                [ProtoMember(11)]
                public List<string> other { get; set; }*/

        /*
                public string url { get; set; }

                /// <summary>
                /// 选项
                /// </summary>
                [ProtoMember(12)]
                public List<Option> option { get; set; }*/

        //public long sequenceNumber { get; set; }
    }
    public class OptionsVote
    {
        public string code { get; set; }
        public string value { get; set; }
        public string desc { get; set; }
    }
}
