using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Serialization;
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace EnVisage.Code.DAL.Mongo
{
///
/// Represents information about any Mix.
///
[BsonIgnoreExtraElements]
[Serializable]
public class MixTeam
{
[BsonId]
public string Id { get; set; }
public bool IsNew { get; set; }
public string Name { get; set; }
public Guid? CompanyId { get; set; }
public Guid? CostCenterId { get; set; }
public Guid[] UserId { get; set; }
public string Group { get; set; }
public Dictionary ExpCategories { get; set; }
public MixTeamCapacity[] PlannedCapacity { get; set; }
///
/// Gets or sets and extra property that stores any fields from Mongo object which are not defined in this class.
///
///
/// This property could contain any values from removed properties. For example, if you remove property from the class to, you can use Metadata property
/// to read removed values from Mongo objects and update any related objects if necessary.
///
[BsonExtraElements]
public BsonDocument Metadata { get; set; }
}
[BsonIgnoreExtraElements]
[Serializable]
public class MixTeamCapacity
{
[BsonId]
public string Id { get; set; }
//public string MixId { get; set; }
//public string TeamId { get; set; }
public string ExpCatId { get; set; }
///
/// Gets or sets a dictionary with capcity values by week. Key - weekending date in milliseconds, value - category need in # of resources.
///
public Dictionary Values { get; set; }
}
[BsonIgnoreExtraElements]
[Serializable]
public class MixTeamView
{
[BsonId]
public string Id { get; set; }
public bool IsNew { get; set; }
public string Name { get; set; }
public string Group { get; set; }
public Guid? CompanyId { get; set; }
public Guid? CostCenterId { get; set; }
public Guid? CapacityTeamId { get; set; }
public bool CopyPlanned { get; set; }
public WidgetExpCategory[] Data { get; set; }
public Guid[] UserId { get; set; }
}
[BsonIgnoreExtraElements]
[Serializable]
public class WidgetExpCategory
{
public Guid Id { get; set; }
public bool InPlan { get; set; }
public string Name { get; set; }
public WidgetExpCatPosition[] Positions { get; set; }
}
[BsonIgnoreExtraElements]
[Serializable]
public class WidgetExpCatPosition
{
public string StartDate { get; set; }
public string EndDate { get; set; }
public DateTime? SDate { get; set; }
public DateTime? EDate { get; set; }
public int Need { get; set; }
}
[BsonIgnoreExtraElements]
[Serializable]
public class ExpCategoryCapacity
{
public Guid Id { get; set; }
public string Name { get; set; }
public decimal UomValue { get; set; }
/// Key - week ending date in milliseconds, value - capacity
public Dictionary PlannedCapacityValues { get; set; }
/// Key - week ending date in milliseconds, value - capacity
public Dictionary ActualCapacityValues { get; set; }
/// Key - week ending date in milliseconds, value - capacity
public Dictionary NeedCapacity { get; set; }
/// Key - week ending date in milliseconds, value - capacity
public Dictionary AllocatedCapacity { get; set; }
///
/// Resource allocations
///
public Dictionary Resources { get; set; }
}
[BsonIgnoreExtraElements]
[Serializable]
public class ActivityResource
{
public Guid Id { get; set; }
public string Name { get; set; }
/// Contains total allocated resource capacity between active scenarios for certain week ending (key in milliseconds).
public Dictionary AllocatedCapacity { get; set; }
/// Contains total available resource capacity for certain week ending (key in milliseconds). Takes from EC UoM value.
public Dictionary TotalCapacity { get; set; }
}
}