tendences, types de lieux et refabrique de code

This commit is contained in:
Paul Schneider 2017-01-02 16:31:43 +01:00
commit 104aec9321
31 changed files with 4560 additions and 52 deletions

View file

@ -5,20 +5,22 @@ using System.Threading.Tasks;
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;
using Yavsc.Models.Identity;
using Yavsc.Models.Market;
using Yavsc.Model.Chat;
using Yavsc.Models.Messaging;
using Yavsc.Models.Access;
using Yavsc.Models.Booking;
using Yavsc.Models.Relationship;
namespace Yavsc.Models
{
using Auth;
using Billing;
using Booking;
using OAuth;
using Workflow;
using Identity;
using Market;
using Chat;
using Messaging;
using Access;
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
protected override void OnModelCreating(ModelBuilder builder)
@ -192,6 +194,12 @@ namespace Yavsc.Models
public DbSet<Connection> Connections { get; set; }
public DbSet<BlackListed> BlackListed { get; set; }
public DbSet<MusicalPreference> MusicalPreferences { get; set; }
public DbSet<MusicalTendency> MusicalTendency { get; set; }
public DbSet<LocationType> LocationType { get; set; }
}
}

View file

@ -2,6 +2,7 @@ using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Billing;
using Yavsc.Models.Relationship;
namespace Yavsc.Models.Booking
{
@ -26,6 +27,10 @@ namespace Yavsc.Models.Booking
set;
}
public LocationType LocationType {
set;
get;
}
public string Reason { get; set; }
public BookQuery()

View file

@ -0,0 +1,12 @@
using System.Collections.Generic;
namespace Yavsc.Models.Booking {
public class MusicalPreference : MusicalTendency {
public long OwnerId { get; set; }
public int Rate { get; set; }
}
}

View file

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

View file

@ -4,7 +4,7 @@ using Newtonsoft.Json;
using Yavsc.Models;
using YavscLib;
namespace Yavsc.Model.Chat
namespace Yavsc.Models.Chat
{
public class Connection : IConnection
@ -20,4 +20,4 @@ namespace Yavsc.Model.Chat
public bool Connected { get; set; }
}
}
}

View file

@ -4,7 +4,7 @@ using Microsoft.AspNet.Identity.EntityFramework;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Identity;
using Yavsc.Model.Chat;
using Yavsc.Models.Chat;
using Yavsc.Model.Bank;
using Yavsc.Models.Access;

View file

@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Relationship
{
public class LocationType
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string Name { get; set; }
}
}