yavsc/Yavsc/Models/Billing/NominativeServiceCommand.cs

86 lines
2.2 KiB
C#
Raw Normal View History

2016-05-17 18:22:18 +02:00
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
2016-06-14 03:37:57 +02:00
namespace Yavsc.Models.Billing
2016-05-17 18:22:18 +02:00
{
2017-02-27 19:28:32 +01:00
using Newtonsoft.Json;
using Workflow;
using Yavsc.Models.Payment;
2017-05-27 16:22:58 +02:00
using Yavsc;
using Yavsc.Billing;
using Yavsc.Workflow;
2016-05-17 18:22:18 +02:00
2017-05-05 23:37:07 +02:00
public abstract class NominativeServiceCommand : IBaseTrackedEntity, IQuery, IIdentified<long>
{
2017-05-30 23:42:04 +02:00
public string GetInvoiceId() { return GetType().Name + "/" + Id; }
2017-05-05 23:37:07 +02:00
public abstract long Id { get; set; }
2017-05-30 23:42:04 +02:00
public abstract string GetDescription ();
2017-05-16 20:58:52 +02:00
[Required()]
public bool Consent { get; set; }
2017-02-13 01:32:03 +01:00
public DateTime DateCreated
{
get; set;
}
public DateTime DateModified
{
get; set;
}
public string UserCreated
{
get; set;
}
public string UserModified
{
get; set;
}
2017-04-08 09:17:15 +02:00
[DisplayAttribute(Name="Status de la requête")]
2017-02-13 01:32:03 +01:00
public QueryStatus Status { get; set; }
2017-02-04 16:33:48 +01:00
[Required]
2016-05-17 18:22:18 +02:00
public string ClientId { get; set; }
/// <summary>
/// The client
/// </summary>
2017-04-08 09:17:15 +02:00
[ForeignKey("ClientId"),Display(Name="Client")]
2016-05-17 18:22:18 +02:00
public ApplicationUser Client { get; set; }
[Required]
public string PerformerId { get; set; }
/// <summary>
/// The performer identifier
/// </summary>
2017-04-08 09:17:15 +02:00
[ForeignKey("PerformerId"),Display(Name="Préstataire")]
2016-05-17 18:22:18 +02:00
public PerformerProfile PerformerProfile { get; set; }
public DateTime? ValidationDate {get; set;}
2017-01-20 14:19:23 +01:00
2017-04-08 09:17:15 +02:00
[Display(Name="Montant prévisionel de la préstation")]
2016-05-17 18:22:18 +02:00
public decimal? Previsional { get; set; }
2016-06-14 03:37:57 +02:00
/// <summary>
/// The bill
/// </summary>
/// <returns></returns>
2016-05-17 18:22:18 +02:00
2017-02-27 19:28:32 +01:00
[Required]
public string ActivityCode { get; set; }
2017-04-08 09:17:15 +02:00
[ForeignKey("ActivityCode"),JsonIgnore,Display(Name="Domaine d'activité")]
2017-02-27 19:28:32 +01:00
public virtual Activity Context  { get; set ; }
2017-05-05 23:37:07 +02:00
2017-05-12 12:15:57 +02:00
public abstract System.Collections.Generic.List<IBillItem> GetBillItems();
public string PaymentId { get; set; }
[ForeignKey("PaymentId"), Display(Name = "Acquittement de la facture")]
2017-05-24 23:36:49 +02:00
public virtual PayPalPayment Regularisation { get; set; }
2017-05-05 23:37:07 +02:00
}
2017-04-08 00:32:23 +02:00
}