files tree made better.
This commit is contained in:
parent
ffbf032480
commit
ccc91bbf19
1630 changed files with 18209 additions and 41860 deletions
101
src/Yavsc.Server/Models/Workflow/Activity.cs
Normal file
101
src/Yavsc.Server/Models/Workflow/Activity.cs
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
using Yavsc.Models.Market;
|
||||
using Yavsc;
|
||||
|
||||
public class Activity : IBaseTrackedEntity, IActivity
|
||||
{
|
||||
|
||||
[StringLength(512), Required, Key]
|
||||
[Display(Name = "Code")]
|
||||
public string Code { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[StringLength(512), Required()]
|
||||
[Display(Name = "Nom")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[StringLength(512)]
|
||||
[Display(Name = "Code du parent")]
|
||||
public string ParentCode { get; set; }
|
||||
|
||||
[ForeignKey("ParentCode"), JsonIgnore]
|
||||
[Display(Name = "Activité parent")]
|
||||
public virtual Activity Parent { get; set; }
|
||||
|
||||
[InverseProperty("Parent"), JsonIgnore]
|
||||
[Display(Name = "Activités filles")]
|
||||
public virtual List<Activity> Children { get; set; }
|
||||
|
||||
[Display(Name = "Description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Display(Name = "Photo")]
|
||||
public string Photo { get; set; }
|
||||
|
||||
[InverseProperty("Context")]
|
||||
[DisplayAttribute(Name = "Services liés")]
|
||||
public List<Service> Services { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Moderation settings
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayAttribute(Name = "Groupe de modération")]
|
||||
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>
|
||||
[Range(0, 100)][DisplayAttribute(Name = "Indice d'exposition")]
|
||||
[DisplayFormatAttribute(DataFormatString="{0}%")]
|
||||
public int Rate { get; set; }
|
||||
[DisplayAttribute(Name = "Classe de paramétrage")]
|
||||
public string SettingsClassName { get; set; }
|
||||
|
||||
[InverseProperty("Context")]
|
||||
[Display(Name="Formulaires de commande")]
|
||||
public virtual List<CommandForm> Forms { get; set; }
|
||||
|
||||
[Display(Name="Date de création")]
|
||||
public DateTime DateCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
[Display(Name="Createur")]
|
||||
public string UserCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
[Display(Name="Date de dernière modification")]
|
||||
public DateTime DateModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
[Display(Name="Utilisateur ayant modifié le dernier")]
|
||||
public string UserModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
[Display(Name="Caché")]
|
||||
|
||||
public bool Hidden { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
22
src/Yavsc.Server/Models/Workflow/CoWorking.cs
Normal file
22
src/Yavsc.Server/Models/Workflow/CoWorking.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
using Yavsc;
|
||||
|
||||
public class CoWorking: ICoWorking
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id {get; set; }
|
||||
|
||||
public string PerformerId { get; set; }
|
||||
public string WorkingForId { get; set; }
|
||||
|
||||
[ForeignKey("PerformerId")]
|
||||
public virtual PerformerProfile Performer { get; set; }
|
||||
|
||||
[ForeignKey("WorkingForId")]
|
||||
public virtual ApplicationUser WorkingFor { get; set; }
|
||||
}
|
||||
}
|
||||
23
src/Yavsc.Server/Models/Workflow/CommandForm.cs
Normal file
23
src/Yavsc.Server/Models/Workflow/CommandForm.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
using Yavsc;
|
||||
public class CommandForm : ICommandForm
|
||||
{
|
||||
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
public string ActionName { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
[Required]
|
||||
public string ActivityCode { get; set; }
|
||||
|
||||
[ForeignKey("ActivityCode"),JsonIgnore]
|
||||
public virtual Activity Context { get; set; }
|
||||
}
|
||||
}
|
||||
64
src/Yavsc.Server/Models/Workflow/PerformerProfile.cs
Normal file
64
src/Yavsc.Server/Models/Workflow/PerformerProfile.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
using System;
|
||||
using Models.Relationship;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc.Workflow;
|
||||
|
||||
public class PerformerProfile : IPerformerProfile {
|
||||
|
||||
[Key]
|
||||
public string PerformerId { get; set; }
|
||||
[ForeignKey("PerformerId")]
|
||||
public virtual ApplicationUser Performer { get; set; }
|
||||
|
||||
[InverseProperty("User")]
|
||||
[Display(Name="Activity"), JsonIgnore]
|
||||
public virtual List<UserActivity> Activity { get; set; }
|
||||
|
||||
[Required,StringLength(14),Display(Name="SIREN"),
|
||||
RegularExpression(@"^[0-9]{9,14}$", ErrorMessage = "Only numbers are allowed here")]
|
||||
public string SIREN { get; set; }
|
||||
|
||||
public long OrganizationAddressId { get; set; }
|
||||
|
||||
[Required,Display(Name="Organization address"),ForeignKey("OrganizationAddressId")]
|
||||
public virtual Location OrganizationAddress { get; set; }
|
||||
|
||||
[Display(Name="Accept notifications on client query")]
|
||||
public bool AcceptNotifications { get; set; }
|
||||
|
||||
[Display(Name="Accept notifications from non-VIP users")]
|
||||
public bool AcceptPublicContact { get; set; }
|
||||
|
||||
[Display(Name="Use my geo-localization, and give me clients near by me")]
|
||||
public bool UseGeoLocalizationToReduceDistanceWithClients { get; set; }
|
||||
|
||||
[Display(Name="Web site")]
|
||||
public string WebSite { get; set; }
|
||||
|
||||
[Display(Name="Active")]
|
||||
public bool Active { get; set; }
|
||||
|
||||
[Obsolete("Implement and use a new specialization setting")]
|
||||
[Display(Name="Maximal Daily Cost (euro/day)"),DisplayFormat(DataFormatString="{0:C}")]
|
||||
public int? MaxDailyCost { get; set; }
|
||||
|
||||
[Obsolete("Implement and use a new specialization setting")]
|
||||
[Display(Name="Minimal Daily Cost (euro/day)"),DisplayFormat(DataFormatString="{0:C}")]
|
||||
public int? MinDailyCost { get; set; }
|
||||
|
||||
[Display(Name="Rate from clients")]
|
||||
public int Rate { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public bool DoesBlog { get {
|
||||
return Performer?.Posts?.Count > 0 ;
|
||||
} }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Models.Workflow.Profiles
|
||||
{
|
||||
using Models.Workflow;
|
||||
using Yavsc;
|
||||
public class FormationSettings : ISpecializationSettings
|
||||
{
|
||||
public virtual List<CoWorking> CoWorking { get; set; }
|
||||
|
||||
[Key]
|
||||
public string UserId
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
75
src/Yavsc.Server/Models/Workflow/RdvQuery.cs
Normal file
75
src/Yavsc.Server/Models/Workflow/RdvQuery.cs
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.Models.Billing;
|
||||
using Yavsc.Models.Relationship;
|
||||
using Yavsc.Billing;
|
||||
|
||||
/// <summary>
|
||||
/// Query, for a date, with a given perfomer, at this given place.
|
||||
/// </summary>
|
||||
|
||||
public class RdvQuery : NominativeServiceCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// The command identifier
|
||||
/// </summary>
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
override public long Id { get; set; }
|
||||
|
||||
[Display(Name = "Event date")]
|
||||
public DateTime EventDate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
public Location Location
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public LocationKind LocationType
|
||||
{
|
||||
set;
|
||||
get;
|
||||
}
|
||||
|
||||
[Display(Name="GiveAnExplicitReason")]
|
||||
public string Reason { get; set; }
|
||||
|
||||
string _description = "Rendez-vous";
|
||||
public override string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
string type = ResourcesHelpers.GlobalLocalizer[this.GetType().Name];
|
||||
return $"{_description} {type}";
|
||||
}
|
||||
set
|
||||
{
|
||||
_description = value;
|
||||
}
|
||||
}
|
||||
|
||||
public RdvQuery()
|
||||
{
|
||||
}
|
||||
|
||||
public RdvQuery(string activityCode, Location eventLocation, DateTime eventDate)
|
||||
{
|
||||
Location = eventLocation;
|
||||
EventDate = eventDate;
|
||||
ActivityCode = activityCode;
|
||||
}
|
||||
|
||||
public override List<IBillItem> GetBillItems()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
src/Yavsc.Server/Models/Workflow/RendezVous.cs
Normal file
39
src/Yavsc.Server/Models/Workflow/RendezVous.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Market;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
using Models.Relationship;
|
||||
|
||||
/// <summary>
|
||||
/// A date, between two persons
|
||||
/// </summary>
|
||||
public class RendezVous: Service {
|
||||
// Haut les mains.
|
||||
|
||||
/// <summary>
|
||||
/// Event date
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Required(),Display(Name="EventDate")]
|
||||
public DateTime EventDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Location identifier
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Required]
|
||||
public long LocationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// A Location for this event
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Required(ErrorMessage="SpecifyPlace"),Display(Name="Location"),ForeignKey("LocationId")]
|
||||
public Location Location { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
22
src/Yavsc.Server/Models/Workflow/Skill.cs
Normal file
22
src/Yavsc.Server/Models/Workflow/Skill.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models {
|
||||
public class Skill {
|
||||
public string Name { get; set; }
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// indice de recherche de ce talent
|
||||
/// rendu par le système.
|
||||
/// Valide entre 0 et 100,
|
||||
/// Il démarre à 0.
|
||||
/// </summary>
|
||||
public int Rate { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
15
src/Yavsc.Server/Models/Workflow/Specialization.cs
Normal file
15
src/Yavsc.Server/Models/Workflow/Specialization.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
public abstract class SpecializationSettings
|
||||
{
|
||||
[Key]
|
||||
public long UserActivityId { get; set; }
|
||||
|
||||
[ForeignKey("UserActivityId")]
|
||||
public virtual UserActivity Context { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
27
src/Yavsc.Server/Models/Workflow/UserActivity.cs
Normal file
27
src/Yavsc.Server/Models/Workflow/UserActivity.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
public class UserActivity
|
||||
{
|
||||
[Required]
|
||||
public string UserId { get; set; }
|
||||
|
||||
[ForeignKey("UserId")]
|
||||
public virtual PerformerProfile User { get; set; }
|
||||
|
||||
[Required]
|
||||
public string DoesCode { get; set; }
|
||||
|
||||
[ForeignKey("DoesCode")]
|
||||
public virtual Activity Does { get; set; }
|
||||
|
||||
[Range(0,100)]
|
||||
public int Weight { get; set; }
|
||||
|
||||
[NotMapped,JsonIgnore]
|
||||
public object Settings { get; internal set; }
|
||||
}
|
||||
}
|
||||
24
src/Yavsc.Server/Models/Workflow/UserSkills.cs
Normal file
24
src/Yavsc.Server/Models/Workflow/UserSkills.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
public partial class UserSkills
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
public string UserId { get; set; }
|
||||
|
||||
[ForeignKey("UserId")]
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
|
||||
public long SkillId { get; set; }
|
||||
|
||||
[ForeignKey("SkillId")]
|
||||
public virtual Skill Skill { get; set; }
|
||||
|
||||
public string Comment { get; set; }
|
||||
public int Rate { get; set; }
|
||||
}
|
||||
}
|
||||
10
src/Yavsc.Server/Models/Workflow/hr.cs
Normal file
10
src/Yavsc.Server/Models/Workflow/hr.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
public partial class hr
|
||||
{
|
||||
public string userid { get; set; }
|
||||
public string comment { get; set; }
|
||||
public decimal rate { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue