making pay, & refactoring
This commit is contained in:
@ -12,7 +12,7 @@ namespace Yavsc.Models
|
||||
[ForeignKey("UserId")]
|
||||
public virtual ApplicationUser Owner { get; set; }
|
||||
|
||||
[Required,Display(Name="Credits in €")]
|
||||
[Required,Display(Name="Credits en €")]
|
||||
public decimal Credits { get; set; }
|
||||
|
||||
public long ContactCredits { get; set; }
|
||||
|
@ -5,13 +5,14 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
using System;
|
||||
using YavscLib.Billing;
|
||||
|
||||
public class CommandLine : ICommandLine {
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
|
||||
[Required,MaxLength(512)]
|
||||
public string Description { get; set; }
|
||||
|
||||
@ -21,9 +22,16 @@ namespace Yavsc.Models.Billing
|
||||
public decimal UnitaryCost { get; set; }
|
||||
|
||||
public long EstimateId { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore,NotMapped,ForeignKey("EstimateId")]
|
||||
virtual public Estimate Estimate { get; set; }
|
||||
}
|
||||
|
||||
public string Currency
|
||||
{
|
||||
get;
|
||||
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,10 +8,13 @@ namespace Yavsc.Models.Billing
|
||||
using Newtonsoft.Json;
|
||||
using Workflow;
|
||||
using YavscLib;
|
||||
using YavscLib.Billing;
|
||||
using YavscLib.Models.Workflow;
|
||||
|
||||
public abstract class NominativeServiceCommand : IBaseTrackedEntity, IQuery
|
||||
public abstract class NominativeServiceCommand : IBaseTrackedEntity, IQuery, IIdentified<long>
|
||||
{
|
||||
public abstract long Id { get; set; }
|
||||
public abstract string Description { get; set; }
|
||||
public DateTime DateCreated
|
||||
{
|
||||
get; set;
|
||||
@ -67,5 +70,10 @@ namespace Yavsc.Models.Billing
|
||||
|
||||
[ForeignKey("ActivityCode"),JsonIgnore,Display(Name="Domaine d'activité")]
|
||||
public virtual Activity Context { get; set ; }
|
||||
}
|
||||
|
||||
public System.Collections.Generic.List<IBillItem> GetBillItems()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,8 +9,16 @@ namespace Yavsc.Models.Haircut
|
||||
{
|
||||
public class HairCutQuery : NominativeServiceCommand
|
||||
{
|
||||
// Bill description
|
||||
public override string Description
|
||||
{
|
||||
get;
|
||||
|
||||
set;
|
||||
} = "Prestation en coiffure à domicile";
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
override public long Id { get; set; }
|
||||
|
||||
[Required]
|
||||
public long PrestationId { get; set; }
|
||||
|
@ -23,8 +23,16 @@ namespace Yavsc.Models.Haircut
|
||||
|
||||
public class HairMultiCutQuery : NominativeServiceCommand
|
||||
{
|
||||
// Bill description
|
||||
public override string Description
|
||||
{
|
||||
get;
|
||||
|
||||
set;
|
||||
} = "Prestation en coiffure à domicile [commande groupée]";
|
||||
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
override public long Id { get; set; }
|
||||
|
||||
[InversePropertyAttribute("Query")]
|
||||
public virtual List<HairPrestationCollectionItem> Prestations { get; set; }
|
||||
|
@ -1,7 +1,6 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
|
@ -16,7 +16,7 @@ namespace Yavsc.Models.Workflow
|
||||
/// The command identifier
|
||||
/// </summary>
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
override public long Id { get; set; }
|
||||
|
||||
[Display(Name = "Event date")]
|
||||
public DateTime EventDate
|
||||
@ -39,6 +39,13 @@ namespace Yavsc.Models.Workflow
|
||||
[Display(Name="GiveAnExplicitReason")]
|
||||
public string Reason { get; set; }
|
||||
|
||||
public override string Description
|
||||
{
|
||||
get;
|
||||
|
||||
set;
|
||||
} = "Rendez-vous";
|
||||
|
||||
public RdvQuery()
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user