diff --git a/Makefile b/Makefile
index 69a1a378..f27550ea 100644
--- a/Makefile
+++ b/Makefile
@@ -10,43 +10,36 @@ Yavsc.Abstract:
Yavsc.Server: Yavsc.Abstract
$(MAKE) -C Yavsc.Server VERSION=$(VERSION)
-Yavsc:
- make -C Yavsc restore
+Yavsc: Yavsc.Server
make -C Yavsc VERSION=$(VERSION)
-Yavsc-deploy-pkg:
+Yavsc-deploy-pkg: Yavsc
make -C Yavsc deploy-pkg
-Yavsc.Server-deploy-pkg:
+Yavsc.Server-deploy-pkg: Yavsc.Server
make -C Yavsc.Server deploy-pkg
-Yavsc.Abstract-deploy-pkg: Yavsc
+Yavsc.Abstract-deploy-pkg: Yavsc.Abstract
make -C Yavsc.Abstract deploy-pkg
-cli-deploy-pkg:
+cli-deploy-pkg: cli
make -C cli deploy-pkg
-Yavsc.Abstract-deploy-pkg: Yavsc.Abstract
-
-Yavsc-Server: Yavsc.Abstract-deploy-pkg
-
-Yavsc.Server-deploy-pkg: Yavsc-Server
-
cli: Yavsc.Abstract-deploy-pkg Yavsc.Server-deploy-pkg
make -C cli restore
make -C cli
-cli-deploy-pkg: cli
+undoLocalYavscNugetDeploy:
+ rm -rf ~/.dnx/packages/Yavsc.Abstract/$(VERSION)
+ rm -rf ~/.dnx/packages/Yavsc.Server/$(VERSION)
deploy-pkgs: Yavsc-deploy-pkg cli-deploy-pkg
memo:
vim ~/TODO.md
-
rc-num:
@echo echo 1-alpha1 < $< ^ $^ @ $@
-
.PHONY: all $(SUBDIRS)
diff --git a/Yavsc.Abstract/Models/Google/AuthToken.cs b/Yavsc.Abstract/Google/AuthToken.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/AuthToken.cs
rename to Yavsc.Abstract/Google/AuthToken.cs
diff --git a/Yavsc.Abstract/Models/Google/Calendar/CalendarEventList.cs b/Yavsc.Abstract/Google/Calendar/CalendarEventList.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/Calendar/CalendarEventList.cs
rename to Yavsc.Abstract/Google/Calendar/CalendarEventList.cs
diff --git a/Yavsc.Abstract/Models/Google/Calendar/CalendarList.cs b/Yavsc.Abstract/Google/Calendar/CalendarList.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/Calendar/CalendarList.cs
rename to Yavsc.Abstract/Google/Calendar/CalendarList.cs
diff --git a/Yavsc.Abstract/Models/Google/Calendar/CalendarListEntry.cs b/Yavsc.Abstract/Google/Calendar/CalendarListEntry.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/Calendar/CalendarListEntry.cs
rename to Yavsc.Abstract/Google/Calendar/CalendarListEntry.cs
diff --git a/Yavsc.Abstract/Models/Google/Calendar/Reminder.cs b/Yavsc.Abstract/Google/Calendar/Reminder.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/Calendar/Reminder.cs
rename to Yavsc.Abstract/Google/Calendar/Reminder.cs
diff --git a/Yavsc.Abstract/Models/Google/GDate.cs b/Yavsc.Abstract/Google/GDate.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/GDate.cs
rename to Yavsc.Abstract/Google/GDate.cs
diff --git a/Yavsc.Abstract/Models/Google/Messaging/MessageWithPayLoad.cs b/Yavsc.Abstract/Google/Messaging/MessageWithPayLoad.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/Messaging/MessageWithPayLoad.cs
rename to Yavsc.Abstract/Google/Messaging/MessageWithPayLoad.cs
diff --git a/Yavsc.Abstract/Models/Google/Messaging/MessageWithPayloadResponse.cs b/Yavsc.Abstract/Google/Messaging/MessageWithPayloadResponse.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/Messaging/MessageWithPayloadResponse.cs
rename to Yavsc.Abstract/Google/Messaging/MessageWithPayloadResponse.cs
diff --git a/Yavsc.Abstract/Models/Google/People/People.cs b/Yavsc.Abstract/Google/People/People.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/People/People.cs
rename to Yavsc.Abstract/Google/People/People.cs
diff --git a/Yavsc.Abstract/Models/Google/Resource.cs b/Yavsc.Abstract/Google/Resource.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/Resource.cs
rename to Yavsc.Abstract/Google/Resource.cs
diff --git a/Yavsc.Abstract/Models/Google/Tracks/Entity.cs b/Yavsc.Abstract/Google/Tracks/Entity.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/Tracks/Entity.cs
rename to Yavsc.Abstract/Google/Tracks/Entity.cs
diff --git a/Yavsc.Abstract/Models/Google/Tracks/EntityQuery.cs b/Yavsc.Abstract/Google/Tracks/EntityQuery.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Google/Tracks/EntityQuery.cs
rename to Yavsc.Abstract/Google/Tracks/EntityQuery.cs
diff --git a/Yavsc.Abstract/Models/Messaging/Notification.cs b/Yavsc.Abstract/Messaging/Notification.cs
similarity index 100%
rename from Yavsc.Abstract/Models/Messaging/Notification.cs
rename to Yavsc.Abstract/Messaging/Notification.cs
diff --git a/Yavsc.Server/Models/Workflow/Process/Conjonction.cs b/Yavsc.Abstract/Workflow/Process/Conjonction.cs
similarity index 100%
rename from Yavsc.Server/Models/Workflow/Process/Conjonction.cs
rename to Yavsc.Abstract/Workflow/Process/Conjonction.cs
diff --git a/Yavsc.Server/Models/Workflow/Process/Disjonction.cs b/Yavsc.Abstract/Workflow/Process/Disjonction.cs
similarity index 100%
rename from Yavsc.Server/Models/Workflow/Process/Disjonction.cs
rename to Yavsc.Abstract/Workflow/Process/Disjonction.cs
diff --git a/Yavsc.Server/Models/Workflow/Process/InputValue.cs b/Yavsc.Abstract/Workflow/Process/InputValue.cs
similarity index 100%
rename from Yavsc.Server/Models/Workflow/Process/InputValue.cs
rename to Yavsc.Abstract/Workflow/Process/InputValue.cs
diff --git a/Yavsc.Server/Models/Workflow/Process/NamedRequisition.cs b/Yavsc.Abstract/Workflow/Process/NamedRequisition.cs
similarity index 100%
rename from Yavsc.Server/Models/Workflow/Process/NamedRequisition.cs
rename to Yavsc.Abstract/Workflow/Process/NamedRequisition.cs
diff --git a/Yavsc.Server/Models/Workflow/Process/Negation.cs b/Yavsc.Abstract/Workflow/Process/Negation.cs
similarity index 100%
rename from Yavsc.Server/Models/Workflow/Process/Negation.cs
rename to Yavsc.Abstract/Workflow/Process/Negation.cs
diff --git a/Yavsc.Server/Models/Workflow/Process/Rule.cs b/Yavsc.Abstract/Workflow/Process/Rule.cs
similarity index 81%
rename from Yavsc.Server/Models/Workflow/Process/Rule.cs
rename to Yavsc.Abstract/Workflow/Process/Rule.cs
index f367344e..f037be04 100644
--- a/Yavsc.Server/Models/Workflow/Process/Rule.cs
+++ b/Yavsc.Abstract/Workflow/Process/Rule.cs
@@ -1,3 +1,4 @@
+using System;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Process
@@ -5,13 +6,13 @@ namespace Yavsc.Models.Process
///
/// An abstract, identified rule
///
- public class Rule
+ public abstract class Rule
{
[Key]
public string Id { get; set; }
///
- /// Left part for this rule, a conjonction.
+ /// Left part for this class of rule, a conjonction.
/// All of these requisitions must be true
/// in order to begin any related process.
///
@@ -28,7 +29,7 @@ namespace Yavsc.Models.Process
public string Description { get; set; }
- public Action Execution { get; set; }
+ public abstract TResult Execute(TInput inputData);
}
}
diff --git a/Yavsc.Abstract/Workflow/Tasks/ITaskRunnerProvider.cs b/Yavsc.Abstract/Workflow/Tasks/ITaskRunnerProvider.cs
index 14f8e072..16bf2801 100644
--- a/Yavsc.Abstract/Workflow/Tasks/ITaskRunnerProvider.cs
+++ b/Yavsc.Abstract/Workflow/Tasks/ITaskRunnerProvider.cs
@@ -2,7 +2,7 @@ namespace Yavsc.Abstract.Workflow
{
public interface ITaskRunnerProvider
{
- ITaskRunner FindRunner(string runnerName);
+ ITaskRunner[] FindRunner(string runnerName);
}
}
\ No newline at end of file
diff --git a/Yavsc.Abstract/Workflow/Tasks/TaskManager.cs b/Yavsc.Abstract/Workflow/Tasks/TaskManager.cs
index 5ae35f4b..55c262f7 100644
--- a/Yavsc.Abstract/Workflow/Tasks/TaskManager.cs
+++ b/Yavsc.Abstract/Workflow/Tasks/TaskManager.cs
@@ -1,10 +1,20 @@
+using System.Collections.Generic;
+using System.Linq;
+
namespace Yavsc.Abstract.Workflow
{
public class TaskManager : ITaskRunnerProvider
{
- public ITaskRunner FindRunner(string runnerName)
+ List runners = new List();
+ public void Register(ITaskRunner runner)
{
- throw new System.NotImplementedException();
+ runners.Add(runner);
+ }
+ public ITaskRunner[] FindRunner(string runnerName)
+ {
+ if (string.IsNullOrWhiteSpace(runnerName))
+ return runners.ToArray();
+ return runners.Where(r => r.GetType().Name.IndexOf(runnerName.Trim())>=0).ToArray();
}
}
}
\ No newline at end of file
diff --git a/Yavsc.Server/Helpers/DbHelpers.cs b/Yavsc.Server/Helpers/DbHelpers.cs
deleted file mode 100644
index afbfe2bf..00000000
--- a/Yavsc.Server/Helpers/DbHelpers.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Yavsc.Server.Helpers
-{
- public static class DbHelpers
- {
- // FIXME BUG [fr] DependencyInjection Pourquoi ce champ ne pourrait pas devenir une propriété ?
- // : casse à l'execution d'un controlleur, se plaignant d'une valeur nule
- public static string ConnectionString = "Server=Your-Server-Adress;Port=5432;Database=YourDadabaseName;Username=YourDatabaseUserName;Password=YourPassword;";
- }
-}
diff --git a/Yavsc/Services/IGoogleCloudMessageSender.cs b/Yavsc.Server/Interfaces/IGoogleCloudMessageSender.cs
similarity index 100%
rename from Yavsc/Services/IGoogleCloudMessageSender.cs
rename to Yavsc.Server/Interfaces/IGoogleCloudMessageSender.cs
diff --git a/Yavsc/Services/ISmsSender.cs b/Yavsc.Server/Interfaces/ISmsSender.cs
similarity index 100%
rename from Yavsc/Services/ISmsSender.cs
rename to Yavsc.Server/Interfaces/ISmsSender.cs
diff --git a/Yavsc.Server/Models/IT/Project.cs b/Yavsc.Server/Models/IT/Project.cs
new file mode 100644
index 00000000..ab913865
--- /dev/null
+++ b/Yavsc.Server/Models/IT/Project.cs
@@ -0,0 +1,38 @@
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using Yavsc.Billing;
+using Yavsc.Models.Billing;
+using Yavsc.Server.Models.IT.SourceCode;
+
+namespace Yavsc.Server.Models.IT
+{
+ public class Project : NominativeServiceCommand
+ {
+ [Key]
+ public override long Id { get; set ; }
+ public string OwnerId { get; set; }
+
+ public string LocalRepo { get; set; }
+
+ [ForeignKey("LocalRepo")]
+ public virtual GitRepositoryReference Repository { get; set; }
+
+ public override List GetBillItems()
+ {
+ throw new System.NotImplementedException();
+ }
+
+ public string Description { get; set; }
+
+ public override string GetDescription()
+ {
+ return Description;
+ }
+
+ public Project()
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/Yavsc.Server/Models/IT/SourceCode/GitRepository.cs b/Yavsc.Server/Models/IT/SourceCode/GitRepository.cs
index 68ef01fb..0d45435e 100644
--- a/Yavsc.Server/Models/IT/SourceCode/GitRepository.cs
+++ b/Yavsc.Server/Models/IT/SourceCode/GitRepository.cs
@@ -1,15 +1,21 @@
+using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models;
namespace Yavsc.Server.Models.IT.SourceCode
{
public class GitRepositoryReference
- {
-
- public string Url { get; set; }
+ {
+ [Key]
public string Path { get; set; }
+
+ [StringLength(2048)]
+ public string Url { get; set; }
+
+ [StringLength(512)]
public string Branch { get; set; }
+ [StringLength(1024)]
public string OwnerId { get; set; }
[ForeignKey("OwnerId")]
diff --git a/Yavsc.Server/Models/Workflow/Process/Action.cs b/Yavsc.Server/Models/Workflow/Process/Action.cs
deleted file mode 100644
index 66e64704..00000000
--- a/Yavsc.Server/Models/Workflow/Process/Action.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using System.Threading.Tasks;
-
-namespace Yavsc.Models.Process
-{
- public abstract class Action
- {
- public abstract Task GetTask(TInput data);
- }
-}
\ No newline at end of file
diff --git a/Yavsc.Server/Models/Workflow/Projet.cs b/Yavsc.Server/Models/Workflow/Projet.cs
deleted file mode 100644
index 03c4a82a..00000000
--- a/Yavsc.Server/Models/Workflow/Projet.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-
-using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
-
-namespace Yavsc.Models
-{
- public partial class Projet
- {
- [Key(),DatabaseGenerated(DatabaseGeneratedOption.Identity)]
- public long Id { get; set; }
-
- [ForeignKeyAttribute("AspNetUsers.Id")]
- public string ManagerId { get; set; }
- public string Name { get; set; }
- public string Description { get; set; }
- }
-}
diff --git a/Yavsc.Server/Models/Workflow/taskdeps.cs b/Yavsc.Server/Models/Workflow/taskdeps.cs
deleted file mode 100644
index ad963ed1..00000000
--- a/Yavsc.Server/Models/Workflow/taskdeps.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-
-namespace Yavsc.Models
-{
- public partial class taskdeps
- {
- public long taskId { get; set; }
- public long deptask { get; set; }
- }
-}
diff --git a/Yavsc.Server/Models/Workflow/tasks.cs b/Yavsc.Server/Models/Workflow/tasks.cs
deleted file mode 100644
index f2bdbceb..00000000
--- a/Yavsc.Server/Models/Workflow/tasks.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-
-namespace Yavsc.Models
-{
- public partial class tasks
- {
- public long id { get; set; }
- public DateTime endd { get; set; }
- public string name { get; set; }
- public long prid { get; set; }
- public DateTime start { get; set; }
- public string tdesc { get; set; }
- }
-}
diff --git a/Yavsc/ViewModels/Services/MessageServices.cs b/Yavsc.Server/Services/MessageServices.cs
similarity index 100%
rename from Yavsc/ViewModels/Services/MessageServices.cs
rename to Yavsc.Server/Services/MessageServices.cs
diff --git a/Yavsc/Settings/CompanyInfoSettings.cs b/Yavsc.Server/Settings/CompanyInfoSettings.cs
similarity index 100%
rename from Yavsc/Settings/CompanyInfoSettings.cs
rename to Yavsc.Server/Settings/CompanyInfoSettings.cs
diff --git a/Yavsc/Settings/EmailEntry.cs b/Yavsc.Server/Settings/EmailEntry.cs
similarity index 100%
rename from Yavsc/Settings/EmailEntry.cs
rename to Yavsc.Server/Settings/EmailEntry.cs
diff --git a/Yavsc/Settings/GoogleAuthSettings.cs b/Yavsc.Server/Settings/GoogleAuthSettings.cs
similarity index 100%
rename from Yavsc/Settings/GoogleAuthSettings.cs
rename to Yavsc.Server/Settings/GoogleAuthSettings.cs
diff --git a/Yavsc/Settings/OAuth2AppSettings.cs b/Yavsc.Server/Settings/OAuth2AppSettings.cs
similarity index 100%
rename from Yavsc/Settings/OAuth2AppSettings.cs
rename to Yavsc.Server/Settings/OAuth2AppSettings.cs
diff --git a/Yavsc/Settings/PayPalSettings.cs b/Yavsc.Server/Settings/PayPalSettings.cs
similarity index 100%
rename from Yavsc/Settings/PayPalSettings.cs
rename to Yavsc.Server/Settings/PayPalSettings.cs
diff --git a/Yavsc/Settings/SiteSettings.cs b/Yavsc.Server/Settings/SiteSettings.cs
similarity index 100%
rename from Yavsc/Settings/SiteSettings.cs
rename to Yavsc.Server/Settings/SiteSettings.cs
diff --git a/Yavsc/Settings/SmtpSettings.cs b/Yavsc.Server/Settings/SmtpSettings.cs
similarity index 100%
rename from Yavsc/Settings/SmtpSettings.cs
rename to Yavsc.Server/Settings/SmtpSettings.cs
diff --git a/Yavsc/Settings/ThirdPartyFiles.cs b/Yavsc.Server/Settings/ThirdPartyFiles.cs
similarity index 100%
rename from Yavsc/Settings/ThirdPartyFiles.cs
rename to Yavsc.Server/Settings/ThirdPartyFiles.cs
diff --git a/Yavsc/Settings/TwilioSettings.cs b/Yavsc.Server/Settings/TwilioSettings.cs
similarity index 100%
rename from Yavsc/Settings/TwilioSettings.cs
rename to Yavsc.Server/Settings/TwilioSettings.cs
diff --git a/Yavsc/Migrations/20180611003253_gitKey.cs b/Yavsc/Migrations/20180611003253_gitKey.cs
deleted file mode 100644
index 37a4c15a..00000000
--- a/Yavsc/Migrations/20180611003253_gitKey.cs
+++ /dev/null
@@ -1,1679 +0,0 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.Data.Entity.Migrations;
-
-namespace Yavsc.Migrations
-{
- public partial class gitKey : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "AspNetRoles",
- columns: table => new
- {
- Id = table.Column(nullable: false),
- ConcurrencyStamp = table.Column(nullable: true),
- Name = table.Column(nullable: true),
- NormalizedName = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_IdentityRole", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "Ban",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- DateCreated = table.Column(nullable: false),
- DateModified = table.Column(nullable: false),
- UserCreated = table.Column(nullable: true),
- UserModified = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Ban", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "Client",
- columns: table => new
- {
- Id = table.Column(nullable: false),
- Active = table.Column(nullable: false),
- DisplayName = table.Column(nullable: true),
- LogoutRedirectUri = table.Column(nullable: true),
- RedirectUri = table.Column(nullable: true),
- RefreshTokenLifeTime = table.Column(nullable: false),
- Secret = table.Column(nullable: true),
- Type = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Client", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "RefreshToken",
- columns: table => new
- {
- Id = table.Column(nullable: false),
- ClientId = table.Column(nullable: false),
- ExpiresUtc = table.Column(nullable: false),
- IssuedUtc = table.Column(nullable: false),
- ProtectedTicket = table.Column(nullable: false),
- Subject = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_RefreshToken", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "BankIdentity",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- AccountNumber = table.Column(nullable: true),
- BIC = table.Column(nullable: true),
- BankCode = table.Column(nullable: true),
- BankedKey = table.Column(nullable: false),
- IBAN = table.Column(nullable: true),
- WicketCode = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_BankIdentity", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "EstimateTemplate",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Description = table.Column(nullable: true),
- OwnerId = table.Column(nullable: false),
- Title = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_EstimateTemplate", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "ExceptionSIREN",
- columns: table => new
- {
- SIREN = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ExceptionSIREN", x => x.SIREN);
- });
- migrationBuilder.CreateTable(
- name: "Period",
- columns: table => new
- {
- Start = table.Column(nullable: false),
- End = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Period", x => new { x.Start, x.End });
- });
- migrationBuilder.CreateTable(
- name: "Option",
- columns: table => new
- {
- Code = table.Column(nullable: false),
- CodeScrutin = table.Column(nullable: false),
- DateCreated = table.Column(nullable: false),
- DateModified = table.Column(nullable: false),
- Description = table.Column(nullable: true),
- UserCreated = table.Column(nullable: true),
- UserModified = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Option", x => new { x.Code, x.CodeScrutin });
- });
- migrationBuilder.CreateTable(
- name: "Color",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Blue = table.Column(nullable: false),
- Green = table.Column(nullable: false),
- Name = table.Column(nullable: true),
- Red = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Color", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "Form",
- columns: table => new
- {
- Id = table.Column(nullable: false),
- Summary = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Form", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "HairPrestation",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Cares = table.Column(nullable: false),
- Cut = table.Column(nullable: false),
- Dressing = table.Column(nullable: false),
- Gender = table.Column(nullable: false),
- Length = table.Column(nullable: false),
- Shampoo = table.Column(nullable: false),
- Tech = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_HairPrestation", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "Feature",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Description = table.Column(nullable: true),
- ShortName = table.Column(nullable: true),
- Status = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Feature", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "Product",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Depth = table.Column(nullable: false),
- Description = table.Column(nullable: true),
- Height = table.Column(nullable: false),
- Name = table.Column(nullable: true),
- Price = table.Column(nullable: true),
- Public = table.Column(nullable: false),
- Weight = table.Column(nullable: false),
- Width = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Product", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "ClientProviderInfo",
- columns: table => new
- {
- UserId = table.Column(nullable: false),
- Avatar = table.Column(nullable: true),
- BillingAddressId = table.Column(nullable: false),
- EMail = table.Column(nullable: true),
- Phone = table.Column(nullable: true),
- UserName = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ClientProviderInfo", x => x.UserId);
- });
- migrationBuilder.CreateTable(
- name: "Notification",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Target = table.Column(nullable: true),
- body = table.Column(nullable: false),
- click_action = table.Column(nullable: false),
- color = table.Column(nullable: true),
- icon = table.Column(nullable: true, defaultValue: "exclam"),
- sound = table.Column(nullable: true),
- tag = table.Column(nullable: true),
- title = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Notification", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "Instrument",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Name = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Instrument", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "MusicalTendency",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Name = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MusicalTendency", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "DjSettings",
- columns: table => new
- {
- UserId = table.Column(nullable: false),
- SoundCloudId = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DjSettings", x => x.UserId);
- });
- migrationBuilder.CreateTable(
- name: "GeneralSettings",
- columns: table => new
- {
- UserId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_GeneralSettings", x => x.UserId);
- });
- migrationBuilder.CreateTable(
- name: "OAuth2Tokens",
- columns: table => new
- {
- UserId = table.Column(nullable: false),
- AccessToken = table.Column(nullable: true),
- Expiration = table.Column(nullable: false),
- ExpiresIn = table.Column(nullable: true),
- RefreshToken = table.Column(nullable: true),
- TokenType = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_OAuth2Tokens", x => x.UserId);
- });
- migrationBuilder.CreateTable(
- name: "Location",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Address = table.Column(nullable: false),
- Latitude = table.Column(nullable: false),
- Longitude = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Location", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "Tag",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Name = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Tag", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "Skill",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Name = table.Column(nullable: true),
- Rate = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Skill", x => x.Id);
- });
- migrationBuilder.CreateTable(
- name: "Activity",
- columns: table => new
- {
- Code = table.Column(nullable: false),
- DateCreated = table.Column(nullable: false),
- DateModified = table.Column(nullable: false),
- Description = table.Column(nullable: true),
- Hidden = table.Column(nullable: false),
- ModeratorGroupName = table.Column(nullable: true),
- Name = table.Column(nullable: false),
- ParentCode = table.Column(nullable: true),
- Photo = table.Column(nullable: true),
- Rate = table.Column(nullable: false),
- SettingsClassName = table.Column(nullable: true),
- UserCreated = table.Column(nullable: true),
- UserModified = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Activity", x => x.Code);
- table.ForeignKey(
- name: "FK_Activity_Activity_ParentCode",
- column: x => x.ParentCode,
- principalTable: "Activity",
- principalColumn: "Code",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "FormationSettings",
- columns: table => new
- {
- UserId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_FormationSettings", x => x.UserId);
- });
- migrationBuilder.CreateTable(
- name: "AspNetRoleClaims",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- ClaimType = table.Column(nullable: true),
- ClaimValue = table.Column(nullable: true),
- RoleId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_IdentityRoleClaim", x => x.Id);
- table.ForeignKey(
- name: "FK_IdentityRoleClaim_IdentityRole_RoleId",
- column: x => x.RoleId,
- principalTable: "AspNetRoles",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "HairTaint",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Brand = table.Column(nullable: true),
- ColorId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_HairTaint", x => x.Id);
- table.ForeignKey(
- name: "FK_HairTaint_Color_ColorId",
- column: x => x.ColorId,
- principalTable: "Color",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "Bug",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- Description = table.Column(nullable: true),
- FeatureId = table.Column(nullable: true),
- Status = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Bug", x => x.Id);
- table.ForeignKey(
- name: "FK_Bug_Feature_FeatureId",
- column: x => x.FeatureId,
- principalTable: "Feature",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "MusicalPreference",
- columns: table => new
- {
- OwnerProfileId = table.Column(nullable: false),
- DjSettingsUserId = table.Column(nullable: true),
- GeneralSettingsUserId = table.Column(nullable: true),
- Rate = table.Column(nullable: false),
- TendencyId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_MusicalPreference", x => x.OwnerProfileId);
- table.ForeignKey(
- name: "FK_MusicalPreference_DjSettings_DjSettingsUserId",
- column: x => x.DjSettingsUserId,
- principalTable: "DjSettings",
- principalColumn: "UserId",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_MusicalPreference_GeneralSettings_GeneralSettingsUserId",
- column: x => x.GeneralSettingsUserId,
- principalTable: "GeneralSettings",
- principalColumn: "UserId",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "AspNetUsers",
- columns: table => new
- {
- Id = table.Column(nullable: false),
- AccessFailedCount = table.Column(nullable: false),
- AllowMonthlyEmail = table.Column(nullable: false),
- Avatar = table.Column(nullable: true, defaultValue: "/images/Users/icon_user.png"),
- BankInfoId = table.Column(nullable: true),
- ConcurrencyStamp = table.Column(nullable: true),
- DedicatedGoogleCalendar = table.Column(nullable: true),
- DiskQuota = table.Column(nullable: false, defaultValue: 524288000L),
- DiskUsage = table.Column(nullable: false),
- Email = table.Column(nullable: true),
- EmailConfirmed = table.Column(nullable: false),
- FullName = table.Column(nullable: true),
- LockoutEnabled = table.Column(nullable: false),
- LockoutEnd = table.Column(nullable: true),
- MaxFileSize = table.Column(nullable: false),
- NormalizedEmail = table.Column(nullable: true),
- NormalizedUserName = table.Column(nullable: true),
- PasswordHash = table.Column(nullable: true),
- PhoneNumber = table.Column(nullable: true),
- PhoneNumberConfirmed = table.Column(nullable: false),
- PostalAddressId = table.Column(nullable: true),
- SecurityStamp = table.Column(nullable: true),
- TwoFactorEnabled = table.Column(nullable: false),
- UserName = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ApplicationUser", x => x.Id);
- table.ForeignKey(
- name: "FK_ApplicationUser_BankIdentity_BankInfoId",
- column: x => x.BankInfoId,
- principalTable: "BankIdentity",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
- table.ForeignKey(
- name: "FK_ApplicationUser_Location_PostalAddressId",
- column: x => x.PostalAddressId,
- principalTable: "Location",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "Service",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- ContextId = table.Column(nullable: true),
- Description = table.Column(nullable: true),
- Name = table.Column(nullable: true),
- Public = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Service", x => x.Id);
- table.ForeignKey(
- name: "FK_Service_Activity_ContextId",
- column: x => x.ContextId,
- principalTable: "Activity",
- principalColumn: "Code",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "CommandForm",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- ActionName = table.Column(nullable: true),
- ActivityCode = table.Column(nullable: false),
- Title = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_CommandForm", x => x.Id);
- table.ForeignKey(
- name: "FK_CommandForm_Activity_ActivityCode",
- column: x => x.ActivityCode,
- principalTable: "Activity",
- principalColumn: "Code",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "HairTaintInstance",
- columns: table => new
- {
- TaintId = table.Column(nullable: false),
- PrestationId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_HairTaintInstance", x => new { x.TaintId, x.PrestationId });
- table.ForeignKey(
- name: "FK_HairTaintInstance_HairPrestation_PrestationId",
- column: x => x.PrestationId,
- principalTable: "HairPrestation",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_HairTaintInstance_HairTaint_TaintId",
- column: x => x.TaintId,
- principalTable: "HairTaint",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "AspNetUserClaims",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- ClaimType = table.Column(nullable: true),
- ClaimValue = table.Column(nullable: true),
- UserId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_IdentityUserClaim", x => x.Id);
- table.ForeignKey(
- name: "FK_IdentityUserClaim_ApplicationUser_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "AspNetUserLogins",
- columns: table => new
- {
- LoginProvider = table.Column(nullable: false),
- ProviderKey = table.Column(nullable: false),
- ProviderDisplayName = table.Column(nullable: true),
- UserId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_IdentityUserLogin", x => new { x.LoginProvider, x.ProviderKey });
- table.ForeignKey(
- name: "FK_IdentityUserLogin_ApplicationUser_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "AspNetUserRoles",
- columns: table => new
- {
- UserId = table.Column(nullable: false),
- RoleId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_IdentityUserRole", x => new { x.UserId, x.RoleId });
- table.ForeignKey(
- name: "FK_IdentityUserRole_IdentityRole_RoleId",
- column: x => x.RoleId,
- principalTable: "AspNetRoles",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_IdentityUserRole_ApplicationUser_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "BlackListed",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- OwnerId = table.Column(nullable: false),
- UserId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_BlackListed", x => x.Id);
- table.ForeignKey(
- name: "FK_BlackListed_ApplicationUser_OwnerId",
- column: x => x.OwnerId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "AccountBalance",
- columns: table => new
- {
- UserId = table.Column(nullable: false),
- ContactCredits = table.Column(nullable: false),
- Credits = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AccountBalance", x => x.UserId);
- table.ForeignKey(
- name: "FK_AccountBalance_ApplicationUser_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "BlogPost",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- AuthorId = table.Column(nullable: true),
- Content = table.Column(nullable: true),
- DateCreated = table.Column(nullable: false),
- DateModified = table.Column(nullable: false),
- Photo = table.Column(nullable: true),
- Rate = table.Column(nullable: false),
- Title = table.Column(nullable: true),
- UserCreated = table.Column(nullable: true),
- UserModified = table.Column(nullable: true),
- Visible = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_BlogPost", x => x.Id);
- table.ForeignKey(
- name: "FK_BlogPost_ApplicationUser_AuthorId",
- column: x => x.AuthorId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "Schedule",
- columns: table => new
- {
- OwnerId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Schedule", x => x.OwnerId);
- table.ForeignKey(
- name: "FK_Schedule_ApplicationUser_OwnerId",
- column: x => x.OwnerId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "ChatConnection",
- columns: table => new
- {
- ConnectionId = table.Column(nullable: false),
- ApplicationUserId = table.Column(nullable: false),
- Connected = table.Column(nullable: false),
- UserAgent = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ChatConnection", x => x.ConnectionId);
- table.ForeignKey(
- name: "FK_ChatConnection_ApplicationUser_ApplicationUserId",
- column: x => x.ApplicationUserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "ChatRoom",
- columns: table => new
- {
- Name = table.Column(nullable: false),
- ApplicationUserId = table.Column(nullable: true),
- Topic = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_ChatRoom", x => x.Name);
- table.ForeignKey(
- name: "FK_ChatRoom_ApplicationUser_ApplicationUserId",
- column: x => x.ApplicationUserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "GoogleCloudMobileDeclaration",
- columns: table => new
- {
- DeviceId = table.Column(nullable: false),
- DeclarationDate = table.Column(nullable: false, defaultValueSql: "LOCALTIMESTAMP"),
- DeviceOwnerId = table.Column(nullable: true),
- GCMRegistrationId = table.Column(nullable: false),
- LatestActivityUpdate = table.Column(nullable: false),
- Model = table.Column(nullable: true),
- Platform = table.Column(nullable: true),
- Version = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_GoogleCloudMobileDeclaration", x => x.DeviceId);
- table.ForeignKey(
- name: "FK_GoogleCloudMobileDeclaration_ApplicationUser_DeviceOwnerId",
- column: x => x.DeviceOwnerId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "Announce",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- For = table.Column(nullable: false),
- Message = table.Column(nullable: true),
- OwnerId = table.Column(nullable: true),
- Sender = table.Column(nullable: true),
- Topic = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_Announce", x => x.Id);
- table.ForeignKey(
- name: "FK_Announce_ApplicationUser_OwnerId",
- column: x => x.OwnerId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Restrict);
- });
- migrationBuilder.CreateTable(
- name: "DimissClicked",
- columns: table => new
- {
- UserId = table.Column(nullable: false),
- NotificationId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_DimissClicked", x => new { x.UserId, x.NotificationId });
- table.ForeignKey(
- name: "FK_DimissClicked_Notification_NotificationId",
- column: x => x.NotificationId,
- principalTable: "Notification",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_DimissClicked_ApplicationUser_UserId",
- column: x => x.UserId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "PayPalPayment",
- columns: table => new
- {
- CreationToken = table.Column(nullable: false),
- DateCreated = table.Column(nullable: false),
- DateModified = table.Column(nullable: false),
- ExecutorId = table.Column(nullable: false),
- OrderReference = table.Column(nullable: true),
- PaypalPayerId = table.Column(nullable: true),
- State = table.Column(nullable: true),
- UserCreated = table.Column(nullable: true),
- UserModified = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_PayPalPayment", x => x.CreationToken);
- table.ForeignKey(
- name: "FK_PayPalPayment_ApplicationUser_ExecutorId",
- column: x => x.ExecutorId,
- principalTable: "AspNetUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
- migrationBuilder.CreateTable(
- name: "Circle",
- columns: table => new
- {
- Id = table.Column(nullable: false)
- .Annotation("Npgsql:Serial", true),
- ApplicationUserId = table.Column(nullable: true),
- Name = table.Column(nullable: true),
- OwnerId = table.Column