refabrique des commandes

This commit is contained in:
Paul Schneider 2016-06-14 03:37:57 +02:00
commit 6bf8c8da65
38 changed files with 2479 additions and 257 deletions

View file

@ -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; }

View file

@ -0,0 +1,9 @@
using Yavsc.Models.Market;
namespace Yavsc.Models.Billing
{
public class Command<P> where P:BaseProduct {
}
}

View file

@ -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 {

View file

@ -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; }

View file

@ -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; }
}

View file

@ -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>

View file

@ -1,6 +1,6 @@
using System;
namespace Yavsc.Models
namespace Yavsc.Models.Billing
{
public partial class histoestim
{

View file

@ -2,7 +2,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
namespace Yavsc.Models.Billing
{
public partial class satisfaction
{

View file

@ -1,5 +1,5 @@
namespace Yavsc.Models
namespace Yavsc.Models.Billing
{
public partial class writtings
{

View file

@ -1,5 +1,5 @@
namespace Yavsc.Models
namespace Yavsc.Models.Billing
{
public partial class wrtags
{

View file

@ -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;
}
}
}

View 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; }
}
}

View file

@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
namespace Yavsc.Models.Market
{
public partial class BaseProduct
{

View file

@ -1,6 +1,6 @@
using System.Collections.Generic;
namespace Yavsc.Models {
namespace Yavsc.Models.Market {
public class Catalog {

View file

@ -1,6 +1,6 @@
namespace Yavsc.Models
namespace Yavsc.Models.Market
{
public partial class Product : BaseProduct
{

View file

@ -1,5 +1,5 @@
namespace Yavsc.Models {
namespace Yavsc.Models.Market {
using System.ComponentModel.DataAnnotations.Schema;
public enum BillingMode { 

View file

@ -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; }
}
}

View file

@ -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 {