profiles dj, musicien, formation

This commit is contained in:
Paul Schneider 2017-01-06 14:02:17 +01:00
commit e143052211
35 changed files with 5364 additions and 18 deletions

View file

@ -200,6 +200,8 @@ namespace Yavsc.Models
public DbSet<MusicalTendency> MusicalTendency { get; set; }
public DbSet<LocationType> LocationType { get; set; }
public DbSet<Instrument> Instrument { get; set; }
}
}

View file

@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Booking
{
public class Instrument
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id {get; set; }
[MaxLength(255),Required]
public string Name { get ; set; }
}
}

View file

@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
namespace Yavsc.Models.Booking
{
public class InstrumentRating
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id {get; set; }
public Instrument Instrument { get; set; }
public int Rate { get; set; }
public string OwnerId { get; set; }
[ForeignKey("OwnerId")]
public virtual PerformerProfile Profile { get; set; }
}
}

View file

@ -1,10 +1,15 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
namespace Yavsc.Models.Booking {
public class MusicalPreference : MusicalTendency {
public long OwnerId { get; set; }
public string OwnerProfileId { get; set; }
[ForeignKey("OwnerProfileId")]
public virtual PerformerProfile OwnerProfile { get; set; }
public int Rate { get; set; }
}

View file

@ -0,0 +1,15 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
namespace Yavsc.Models.Booking
{
public class DjPerformerProfile : PerformerProfile
{
public string SoundCloudId { get; set; }
[InverseProperty("OwnerProfile")]
public virtual List<MusicalPreference> SoundColor { get; set; }
}
}

View file

@ -0,0 +1,12 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
namespace Yavsc.Models.Booking.Profiles
{
public class FormationPerformerProfile
{
[InverseProperty("WorkingFor")]
public virtual List<CoWorking> CoWorking { get; set; }
}
}

View file

@ -0,0 +1,14 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Workflow;
namespace Yavsc.Models.Booking
{
public class MusicianPerformerProfile : PerformerProfile
{
[InverseProperty("Profile")]
public virtual List<InstrumentRating> Instrumentation {
get; set;
}
}
}

View file

@ -18,6 +18,15 @@ namespace Yavsc.Models
[StringLength(512),Required()]
public string Name {get; set;}
[StringLength(512)]
public string ParentCode { get; set; }
[ForeignKey("ParentCode")]
public virtual Activity Parent { get; set; }
[InverseProperty("Parent")]
public virtual List<Activity> Children { get; set; }
public string Description {get; set;}
/// <summary>
/// Name to associate to a performer in this activity domain

View file

@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Workflow
{
public class CoWorking
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id {get; set; }
public string PerformerId { get; set; }
public string WorkingForId { get; set; }
[ForeignKey("PerformerId")]
public virtual PerformerProfile Performer { get; set; }
[ForeignKey("WorkingForId")]
public virtual ApplicationUser WorkingFor { get; set; }
}
}