yavsc/Yavsc/Models/Workflow/Activity.cs

89 lines
2.2 KiB
C#
Raw Normal View History

2017-01-31 13:19:12 +01:00
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2017-01-31 13:19:12 +01:00
using Newtonsoft.Json;
2017-01-31 13:19:12 +01:00
namespace Yavsc.Models.Workflow
{
2017-02-02 15:13:32 +01:00
using Market;
using YavscLib;
public class Activity : IBaseTrackedEntity, IActivity
{
2017-02-02 15:13:32 +01:00
[StringLength(512), Required, Key]
public string Code { get; set; }
/// <summary>
///
/// </summary>
/// <returns></returns>
2017-02-02 15:13:32 +01:00
[StringLength(512), Required()]
public string Name { get; set; }
[StringLength(512)]
public string ParentCode { get; set; }
2017-02-02 15:13:32 +01:00
[ForeignKey("ParentCode"), JsonIgnore]
public virtual Activity Parent { get; set; }
2017-02-02 15:13:32 +01:00
[InverseProperty("Parent"), JsonIgnore]
public virtual List<Activity> Children { get; set; }
2017-02-02 15:13:32 +01:00
public string Description { get; set; }
/// <summary>
/// Name to associate to a performer in this activity domain
/// </summary>
2017-02-02 15:13:32 +01:00
[Obsolete]
public string ActorDenomination { get; set; }
2017-02-02 15:13:32 +01:00
public string Photo { get; set; }
2017-02-02 15:13:32 +01:00
[InverseProperty("Context")]
public List<Service> Services { get; set; }
2017-02-02 15:13:32 +01:00
/// <summary>
/// Moderation settings
/// </summary>
/// <returns></returns>
2017-02-02 15:13:32 +01:00
public string ModeratorGroupName { get; set; }
/// <summary>
/// indice de recherche de cette activité
/// rendu par le système.
/// Valide entre 0 et 100,
/// Il démarre à 0.
/// </summary>
2017-02-02 15:13:32 +01:00
[Range(0, 100)]
public int Rate { get; set; }
[DisplayAttribute(Name = "SettingsClass")]
public string SettingsClassName { get; set; }
2017-01-24 10:43:42 +01:00
[InverseProperty("Context")]
public virtual List<CommandForm> Forms { get; set; }
2017-01-31 13:19:12 +01:00
public DateTime DateCreated
{
2017-02-02 15:13:32 +01:00
get; set;
2017-01-31 13:19:12 +01:00
}
public string UserCreated
{
2017-02-02 15:13:32 +01:00
get; set;
2017-01-31 13:19:12 +01:00
}
public DateTime DateModified
{
2017-02-02 15:13:32 +01:00
get; set;
2017-01-31 13:19:12 +01:00
}
public string UserModified
{
2017-02-02 15:13:32 +01:00
get; set;
2017-01-31 13:19:12 +01:00
}
2017-02-20 15:53:25 +01:00
public bool Hidden { get; set; }
}
}