refabrique des commandes
This commit is contained in:
parent
45ead1cab7
commit
6bf8c8da65
38 changed files with 2479 additions and 257 deletions
|
|
@ -6,8 +6,10 @@ using Microsoft.AspNet.Authentication.OAuth;
|
|||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
using Microsoft.Data.Entity;
|
||||
using Yavsc.Models.Auth;
|
||||
using Yavsc.Models.Billing;
|
||||
using Yavsc.Models.Booking;
|
||||
using Yavsc.Models.OAuth;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
|
|
@ -61,15 +63,15 @@ namespace Yavsc.Models
|
|||
/// on his profile).
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<Command> Commands { get; set; }
|
||||
public DbSet<BookQuery> Commands { get; set; }
|
||||
/// <summary>
|
||||
/// Special commands, talking about
|
||||
/// a given place and date.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DbSet<Booking.BookQuery> BookQueries { get; set; }
|
||||
public DbSet<BookQuery> BookQueries { get; set; }
|
||||
public DbSet<PerformerProfile> Performers { get; set; }
|
||||
public DbSet<Estimate> Estimates { get; set; }
|
||||
public DbSet<RDVEstimate> Estimates { get; set; }
|
||||
public DbSet<AccountBalance> BankStatus { get; set; }
|
||||
public DbSet<BalanceImpact> BankBook { get; set; }
|
||||
public DbSet<Location> Map { get; set; }
|
||||
|
|
|
|||
9
Yavsc/Model/Billing/Command.cs
Normal file
9
Yavsc/Model/Billing/Command.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using Yavsc.Models.Market;
|
||||
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
|
||||
public class Command<P> where P:BaseProduct {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Market;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
|
||||
public class CommandLine {
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@ using System.Collections.Generic;
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using Yavsc.Models.Booking;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
public partial class Estimate
|
||||
public partial class RDVEstimate
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
|
@ -19,7 +20,7 @@ namespace Yavsc.Models
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[ForeignKey("CommandId")]
|
||||
public virtual Command Command { get; set; }
|
||||
public BookQuery Query { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int? Status { get; set; }
|
||||
public string Title { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
public partial class EstimateAgreement : Estimate
|
||||
public partial class EstimateAgreement : RDVEstimate
|
||||
{
|
||||
public DateTime ClientValidationDate { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,17 +3,13 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Market;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
|
||||
public class Command {
|
||||
|
||||
/// <summary>
|
||||
/// The command identifier
|
||||
/// </summary>
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id {get; set; }
|
||||
public class NominativeServiceCommand : Command<Service> {
|
||||
|
||||
public string ClientId { get; set; }
|
||||
|
||||
|
|
@ -40,6 +36,10 @@ namespace Yavsc.Models
|
|||
public DateTime CreationDate {get; set;}
|
||||
|
||||
public decimal? Previsional { get; set; }
|
||||
/// <summary>
|
||||
/// The bill
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<CommandLine> Bill { get; set; }
|
||||
|
||||
///<summary>
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
public partial class histoestim
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
public partial class satisfaction
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
public partial class writtings
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
public partial class wrtags
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Billing;
|
||||
|
||||
namespace Yavsc.Models.Booking
|
||||
{
|
||||
|
|
@ -8,28 +9,24 @@ namespace Yavsc.Models.Booking
|
|||
/// Query, for a date, with a given perfomer, at this given place.
|
||||
/// </summary>
|
||||
|
||||
public class BookQuery : Command {
|
||||
|
||||
/// <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 class BookQuery : NominativeServiceCommand {
|
||||
/// <summary>
|
||||
/// The command identifier
|
||||
/// </summary>
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id {get; set; }
|
||||
public DateTime EventDate{get; set; }
|
||||
public Location Location { get; set; }
|
||||
|
||||
public BookQuery()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public BookQuery(Location eventLocation, DateTime eventDate)
|
||||
{
|
||||
Location = eventLocation;
|
||||
EventDate = eventDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Yavsc/Model/Booking/RendezVous.cs
Normal file
38
Yavsc/Model/Booking/RendezVous.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Market;
|
||||
|
||||
namespace Yavsc.Models.Booking
|
||||
{
|
||||
/// <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; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Market
|
||||
{
|
||||
public partial class BaseProduct
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models {
|
||||
namespace Yavsc.Models.Market {
|
||||
|
||||
|
||||
public class Catalog {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
|
||||
namespace Yavsc.Models
|
||||
namespace Yavsc.Models.Market
|
||||
{
|
||||
public partial class Product : BaseProduct
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
namespace Yavsc.Models {
|
||||
namespace Yavsc.Models.Market {
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
public enum BillingMode {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Market;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
|
|
@ -35,5 +36,7 @@ namespace Yavsc.Models
|
|||
/// <returns></returns>
|
||||
string ModeratorGroupName { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Market;
|
||||
|
||||
namespace Yavsc.Models {
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
|
||||
public class PerformerProfile {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue