refact
This commit is contained in:
parent
d8fa166115
commit
cea0defaf4
16 changed files with 309 additions and 38 deletions
|
|
@ -2,14 +2,38 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Interfaces.Workflow;
|
||||
using Yavsc.Models.Market;
|
||||
using Yavsc.Models.Workflow;
|
||||
using YavscLib;
|
||||
|
||||
namespace Yavsc.Models.Billing
|
||||
{
|
||||
|
||||
public class NominativeServiceCommand<T> : Query<T> where T:Service
|
||||
public abstract class NominativeServiceCommand : IBaseTrackedEntity, IQuery
|
||||
{
|
||||
public DateTime DateCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public DateTime DateModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string UserCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string UserModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public QueryStatus Status { get; set; }
|
||||
|
||||
[Required]
|
||||
public string ClientId { get; set; }
|
||||
|
||||
14
Yavsc/Models/Haircut/HairCutQuery.cs
Normal file
14
Yavsc/Models/Haircut/HairCutQuery.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Billing;
|
||||
|
||||
namespace Yavsc.Models.Haircut
|
||||
{
|
||||
public class HairCutQuery : NominativeServiceCommand
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
HairPrestation [] Prestations { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
namespace Yavsc.Models.Messaging
|
||||
namespace Yavsc.Models.Haircut
|
||||
{
|
||||
public class HairCutQueryEvent : BookQueryProviderInfo, IEvent
|
||||
{
|
||||
|
|
@ -27,5 +27,7 @@ namespace Yavsc.Models.Messaging
|
|||
|
||||
set;
|
||||
}
|
||||
|
||||
HairCutQuery Data { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,13 +1,11 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Models.Market;
|
||||
|
||||
namespace Yavsc.Models.Haircut
|
||||
{
|
||||
public class HairPrestation
|
||||
public class HairPrestation : Service
|
||||
{
|
||||
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set;}
|
||||
|
||||
public HairLength Length { get; set; }
|
||||
public HairCutGenders Gender { get; set; }
|
||||
public bool Cut { get; set; }
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ namespace Yavsc.Models.Haircut
|
|||
public string Brand { get; set; }
|
||||
|
||||
[Required]
|
||||
public Color Color {get; set;}
|
||||
public long ColorId { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("ColorId")]
|
||||
public virtual Color Color {get; set;}
|
||||
}
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ namespace Yavsc.Models.Workflow
|
|||
/// Query, for a date, with a given perfomer, at this given place.
|
||||
/// </summary>
|
||||
|
||||
public class BookQuery : NominativeServiceCommand<RendezVous>, IBaseTrackedEntity
|
||||
public class BookQuery : NominativeServiceCommand
|
||||
{
|
||||
/// <summary>
|
||||
/// The command identifier
|
||||
|
|
|
|||
|
|
@ -6,28 +6,8 @@ namespace Yavsc.Models.Workflow
|
|||
using Models.Market;
|
||||
using YavscLib;
|
||||
|
||||
public class Query<P>: IBaseTrackedEntity where P : BaseProduct
|
||||
public interface IQuery: IBaseTrackedEntity
|
||||
{
|
||||
public DateTime DateCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public DateTime DateModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string UserCreated
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string UserModified
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
QueryStatus Status { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue