Gestion des activités
This commit is contained in:
parent
2644ac2d60
commit
50f7f1813c
22 changed files with 91 additions and 63 deletions
|
|
@ -34,6 +34,7 @@ namespace Yavsc.Models
|
|||
builder.Entity<GoogleCloudMobileDeclaration>().Property(x=>x.DeclarationDate).HasDefaultValueSql("LOCALTIMESTAMP");
|
||||
builder.Entity<PostTag>().HasKey(x=>new { x.PostId, x.TagId});
|
||||
builder.Entity<ApplicationUser>().HasMany<Connection>( c=>c.Connections );
|
||||
builder.Entity<UserActivity>().HasKey(u=> new { u.DoesCode, u.UserId});
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ namespace Yavsc.Models.Billing
|
|||
{
|
||||
using Interfaces;
|
||||
using Models.Booking;
|
||||
using Yavsc.Models.Workflow;
|
||||
|
||||
public partial class Estimate : IEstimate
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
|
|
@ -61,8 +63,13 @@ namespace Yavsc.Models.Billing
|
|||
[Required]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKey("OwnerId")]
|
||||
public virtual PerformerProfile Owner { get; set; }
|
||||
|
||||
[Required]
|
||||
public string ClientId { get; set; }
|
||||
[ForeignKey("ClientId")]
|
||||
public virtual ApplicationUser Client { get; set; }
|
||||
|
||||
public string CommandType
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using Yavsc.Models.Workflow;
|
|||
|
||||
namespace Yavsc.Models.Booking
|
||||
{
|
||||
public class DjPerformerProfile : PerformerProfile
|
||||
public class DjPerformerProfile : SpecializationSettings
|
||||
{
|
||||
public string SoundCloudId { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Yavsc.Models.Workflow
|
|||
public virtual ApplicationUser Performer { get; set; }
|
||||
|
||||
[InverseProperty("User")]
|
||||
[Display(Name="Activity"),Required]
|
||||
[Display(Name="Activity")]
|
||||
public virtual List<UserActivity> Activity { get; set; }
|
||||
|
||||
[Required,StringLength(14),Display(Name="SIREN"),
|
||||
|
|
|
|||
15
Yavsc/Models/Workflow/Specialization.cs
Normal file
15
Yavsc/Models/Workflow/Specialization.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Workflow
|
||||
{
|
||||
public abstract class SpecializationSettings
|
||||
{
|
||||
[Key]
|
||||
public long UserActivityId { get; set; }
|
||||
|
||||
[ForeignKey("UserActivityId")]
|
||||
public virtual UserActivity Context { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue