//  @ Project : TestOnline
//  @ File Name : Test.cs
//  @ Date : 2009-3-12
//  @ Author : ruimingde
using System;
using System.Collections.Generic;
using System.Text;

namespace Entity
{
    public class Test
    {
        private int testID;

        public int TestID
        {
            get { return testID; }
            set { testID = value; }
        }

        public int RecorderID { get; set; }

        private string testName;

        public string TestName
        {
            get { return testName; }
            set { testName = value; }
        }
        private Paper paper=new Paper();

        public Paper Paper
        {
            get { return paper; }
            set { paper = value; }
        }

        public PaperType PaperType { get; set; }

        public int TotalScores { get; set; }

        public int PassScores { get; set; }

        private short neededMinutes;

        public short NeededMinutes
        {
            get { return neededMinutes; }
            set { neededMinutes = value; }
        }
        private DateTime enableDate=DateTime.Now;

        public DateTime EnableDate
        {
            get { return enableDate; }
            set { enableDate = value; }
        }
        private DateTime unabaleDate=DateTime.Now;

        public DateTime UnabaleDate
        {
            get { return unabaleDate;}
            set { unabaleDate = value; }
        }

        private bool hasUnable = false;
        public bool HasUnable
        {
            get 
            {
                DateTime now = DateTime.Now;

                if (unabaleDate.Date.CompareTo(now.Date) < 0)
                    hasUnable = true;
                 
                return hasUnable; 
            }
        }

        private bool beforeEnable = false;
        public bool BeforeEnable
        {
            get
            {
                DateTime now = DateTime.Now;

                if (enableDate.Date.CompareTo(now.Date) > 0)
                    beforeEnable = true;

                return beforeEnable;
            }
        }

        private short autoSaveInterval;

        public short AutoSaveInterval
        {
            get { return autoSaveInterval; }
            set { autoSaveInterval = value; }
        }
        private List<Tester> testerList=new List<Tester>();

        public List<Tester> TesterList
        {
            get { return testerList; }
            set { testerList = value; }
        }

        private User creator = new User();

        public User Creator
        {
            get { return creator; }
            set { creator = value; }
        }
        private DateTime createdTime=DateTime.Now;

        public DateTime CreatedTime
        {
            get { return createdTime; }
            set { createdTime = value; }
        }

        private bool hasTested = false;
        public bool HasTested
        {
            get { return hasTested; }
            set { hasTested = value; }
        }

        private bool marked = false;
        public bool Marked
        {
            get { return marked; }
            set { marked = value; }
        }

        private int testerCount = 0;
        public int TesterCount
        {
            get { return testerCount; }
            set { testerCount = value; }
        }

        private int testerCountHasTested = 0;
        public int TesterCountHasTested
        {
            get { return testerCountHasTested; }
            set { testerCountHasTested = value; }
        }
    }
}