interface
This commit is contained in:
parent
29a0cb9c4b
commit
6589a4f948
6 changed files with 86 additions and 25 deletions
|
|
@ -4,48 +4,50 @@ using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Yavsc.Models.Market;
|
|
||||||
|
|
||||||
namespace Yavsc.Models.Workflow
|
namespace Yavsc.Models.Workflow
|
||||||
{
|
{
|
||||||
public class Activity : IBaseTrackedEntity
|
using Market;
|
||||||
|
using YavscLib;
|
||||||
|
|
||||||
|
public class Activity : IBaseTrackedEntity, IActivity
|
||||||
{
|
{
|
||||||
|
|
||||||
[StringLength(512),Required,Key]
|
[StringLength(512), Required, Key]
|
||||||
public string Code {get; set;}
|
public string Code { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[StringLength(512),Required()]
|
[StringLength(512), Required()]
|
||||||
public string Name {get; set;}
|
public string Name { get; set; }
|
||||||
|
|
||||||
[StringLength(512)]
|
[StringLength(512)]
|
||||||
public string ParentCode { get; set; }
|
public string ParentCode { get; set; }
|
||||||
|
|
||||||
[ForeignKey("ParentCode"),JsonIgnore]
|
[ForeignKey("ParentCode"), JsonIgnore]
|
||||||
public virtual Activity Parent { get; set; }
|
public virtual Activity Parent { get; set; }
|
||||||
|
|
||||||
[InverseProperty("Parent"),JsonIgnore]
|
[InverseProperty("Parent"), JsonIgnore]
|
||||||
public virtual List<Activity> Children { get; set; }
|
public virtual List<Activity> Children { get; set; }
|
||||||
|
|
||||||
public string Description {get; set;}
|
public string Description { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Name to associate to a performer in this activity domain
|
/// Name to associate to a performer in this activity domain
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
[Obsolete]
|
||||||
public string ActorDenomination {get; set;}
|
public string ActorDenomination { get; set; }
|
||||||
|
|
||||||
public string Photo {get; set;}
|
public string Photo { get; set; }
|
||||||
|
|
||||||
[InverseProperty("Context")]
|
[InverseProperty("Context")]
|
||||||
public List<Service> Services { get; set; }
|
public List<Service> Services { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Moderation settings
|
/// Moderation settings
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
string ModeratorGroupName { get; set; }
|
public string ModeratorGroupName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// indice de recherche de cette activité
|
/// indice de recherche de cette activité
|
||||||
|
|
@ -53,10 +55,10 @@ namespace Yavsc.Models.Workflow
|
||||||
/// Valide entre 0 et 100,
|
/// Valide entre 0 et 100,
|
||||||
/// Il démarre à 0.
|
/// Il démarre à 0.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Range(0,100)]
|
[Range(0, 100)]
|
||||||
public int Rate { get; set; }
|
public int Rate { get; set; }
|
||||||
[DisplayAttribute(Name="SettingsClass")]
|
[DisplayAttribute(Name = "SettingsClass")]
|
||||||
public string SettingsClassName { get; set; }
|
public string SettingsClassName { get; set; }
|
||||||
|
|
||||||
[InverseProperty("Context")]
|
[InverseProperty("Context")]
|
||||||
public virtual List<CommandForm> Forms { get; set; }
|
public virtual List<CommandForm> Forms { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Yavsc.Models.Workflow
|
namespace Yavsc.Models.Workflow
|
||||||
{
|
{
|
||||||
public class CoWorking
|
using YavscLib;
|
||||||
|
|
||||||
|
public class CoWorking: ICoWorking
|
||||||
{
|
{
|
||||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public long Id {get; set; }
|
public long Id {get; set; }
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@ using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Yavsc.Models.Workflow
|
namespace Yavsc.Models.Workflow
|
||||||
{
|
{
|
||||||
public class CommandForm
|
using YavscLib;
|
||||||
|
public class CommandForm : ICommandForm
|
||||||
{
|
{
|
||||||
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public long Id { get; set; }
|
public long Id { get; set; }
|
||||||
|
|
|
||||||
35
YavscLib/IActivity.cs
Normal file
35
YavscLib/IActivity.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace YavscLib
|
||||||
|
{
|
||||||
|
public interface IActivity
|
||||||
|
{
|
||||||
|
string Code { get; set; }
|
||||||
|
string Name { get; set; }
|
||||||
|
string ParentCode { get; set; }
|
||||||
|
string Photo { get; set; }
|
||||||
|
|
||||||
|
string ModeratorGroupName { get; set; }
|
||||||
|
int Rate { get; set; }
|
||||||
|
string SettingsClassName { get; set; }
|
||||||
|
DateTime DateCreated
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
string UserCreated
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime DateModified
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
|
string UserModified
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
10
YavscLib/ICoWorking.cs
Normal file
10
YavscLib/ICoWorking.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
namespace YavscLib
|
||||||
|
{
|
||||||
|
public interface ICoWorking
|
||||||
|
{
|
||||||
|
long Id {get; set; }
|
||||||
|
string PerformerId { get; set; }
|
||||||
|
string WorkingForId { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
11
YavscLib/ICommandForm.cs
Normal file
11
YavscLib/ICommandForm.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
namespace YavscLib
|
||||||
|
{
|
||||||
|
public interface ICommandForm
|
||||||
|
{
|
||||||
|
long Id { get; set; }
|
||||||
|
string Action { get; set; }
|
||||||
|
string Title { get; set; }
|
||||||
|
string ActivityCode { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue