Entities vereinfacht (kein Entity Developer mehr)
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// This is auto-generated code.
|
||||
//------------------------------------------------------------------------------
|
||||
// This code was generated by Entity Developer tool using EF Core template.
|
||||
// Code is generated on: 11.04.2022 17:16:51
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
public partial class Interaction {
|
||||
|
||||
public Interaction()
|
||||
{
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
public virtual Guid Id { get; set; }
|
||||
|
||||
public virtual Guid UserId { get; set; }
|
||||
|
||||
public virtual DateTime Date { get; set; }
|
||||
|
||||
public virtual string Info { get; set; }
|
||||
|
||||
public virtual InteractionType Type { get; set; }
|
||||
|
||||
public virtual Guid ProspectId { get; set; }
|
||||
|
||||
public virtual bool Alert { get; set; }
|
||||
|
||||
public virtual bool NotNeeded { get; set; }
|
||||
|
||||
public virtual DateTime Created { get; set; }
|
||||
|
||||
public virtual User User { get; set; }
|
||||
|
||||
public virtual Prospect Prospect { get; set; }
|
||||
|
||||
#region Extensibility Method Definitions
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
@@ -9,7 +10,68 @@ using System.Linq.Expressions;
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
|
||||
public partial class Interaction
|
||||
/// <summary>
|
||||
/// The interaction class (a. beging, 21.05.2022)
|
||||
/// </summary>
|
||||
public class Interaction
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the alert (ab)
|
||||
/// </summary>
|
||||
public bool Alert { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the created (ab)
|
||||
/// </summary>
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the date (ab)
|
||||
/// </summary>
|
||||
public DateTime Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the id (ab)
|
||||
/// </summary>
|
||||
[Key] public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the info (ab)
|
||||
/// </summary>
|
||||
public string? Info { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the not needed (ab)
|
||||
/// </summary>
|
||||
public bool NotNeeded { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the prospect (ab)
|
||||
/// </summary>
|
||||
public Prospect Prospect { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the prospect id (ab)
|
||||
/// </summary>
|
||||
public Guid ProspectID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the type (ab)
|
||||
/// </summary>
|
||||
public InteractionType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the user (ab)
|
||||
/// </summary>
|
||||
public User User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the user id (ab)
|
||||
/// </summary>
|
||||
public Guid UserID { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
|
||||
public partial class InteractionDate
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
|
||||
public partial class InteractionProcess
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,37 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// This is auto-generated code.
|
||||
//------------------------------------------------------------------------------
|
||||
// This code was generated by Entity Developer tool using EF Core template.
|
||||
// Code is generated on: 11.04.2022 17:16:51
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// The interaction type enum
|
||||
/// </summary>
|
||||
public enum InteractionType : int
|
||||
{
|
||||
/// <summary>
|
||||
/// The ein ab interaction type
|
||||
/// </summary>
|
||||
EinAb = 10,
|
||||
/// <summary>
|
||||
/// The welcome interaction type
|
||||
/// </summary>
|
||||
Welcome = 20,
|
||||
/// <summary>
|
||||
/// The id check interaction type
|
||||
/// </summary>
|
||||
IdCheck = 30,
|
||||
/// <summary>
|
||||
/// The print pass interaction type
|
||||
/// </summary>
|
||||
PrintPass = 40,
|
||||
/// <summary>
|
||||
/// The pdf pass interaction type
|
||||
/// </summary>
|
||||
PdfPass = 50,
|
||||
/// <summary>
|
||||
/// The verify interaction type
|
||||
/// </summary>
|
||||
Verify = 60,
|
||||
/// <summary>
|
||||
/// The complete interaction type
|
||||
/// </summary>
|
||||
Complete = 70
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// This is auto-generated code.
|
||||
//------------------------------------------------------------------------------
|
||||
// This code was generated by Entity Developer tool using EF Core template.
|
||||
// Code is generated on: 11.04.2022 17:16:51
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
public partial class Prospect {
|
||||
|
||||
public Prospect()
|
||||
{
|
||||
this.Interactions = new List<Interaction>();
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
public virtual Guid Id { get; set; }
|
||||
|
||||
public virtual int FsId { get; set; }
|
||||
|
||||
public virtual string Name { get; set; }
|
||||
|
||||
public virtual DateTime Created { get; set; }
|
||||
|
||||
public virtual string Memo { get; set; }
|
||||
|
||||
public virtual IList<Interaction> Interactions { get; set; }
|
||||
|
||||
#region Extensibility Method Definitions
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,8 +1,51 @@
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
|
||||
public partial class Prospect
|
||||
/// <summary>
|
||||
/// The prospect class (a. beging, 21.05.2022)
|
||||
/// </summary>
|
||||
public class Prospect
|
||||
{
|
||||
public bool Complete => Interactions?.Any(x => x.Type == InteractionType.Complete) == true;
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value of the complete (ab)
|
||||
/// </summary>
|
||||
[NotMapped] public bool Complete => Interactions?.Any(x => x.Type == InteractionType.Complete) == true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the created (ab)
|
||||
/// </summary>
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the fs id (ab)
|
||||
/// </summary>
|
||||
public int FsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the id (ab)
|
||||
/// </summary>
|
||||
[Key] public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the interactions (ab)
|
||||
/// </summary>
|
||||
public IList<Interaction> Interactions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the memo (ab)
|
||||
/// </summary>
|
||||
public string? Memo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the name (ab)
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// This is auto-generated code.
|
||||
//------------------------------------------------------------------------------
|
||||
// This code was generated by Entity Developer tool using EF Core template.
|
||||
// Code is generated on: 11.04.2022 17:16:51
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
public partial class User {
|
||||
|
||||
public User()
|
||||
{
|
||||
this.Interactions = new List<Interaction>();
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
public virtual Guid Id { get; set; }
|
||||
|
||||
public virtual string Mail { get; set; }
|
||||
|
||||
public virtual UserType Type { get; set; }
|
||||
|
||||
public virtual bool Verified { get; set; }
|
||||
|
||||
public virtual string Name { get; set; }
|
||||
|
||||
public virtual DateTime Created { get; set; }
|
||||
|
||||
public virtual string EncryptedPassword { get; set; }
|
||||
|
||||
public virtual string Groups { get; set; }
|
||||
|
||||
public virtual bool ForceLogout { get; set; }
|
||||
|
||||
public virtual IList<Interaction> Interactions { get; set; }
|
||||
|
||||
#region Extensibility Method Definitions
|
||||
|
||||
partial void OnCreated();
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using FoodsharingSiegen.Contracts.Helper;
|
||||
|
||||
@@ -7,10 +8,30 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
/// <summary>
|
||||
/// The user class (a. beging, 06.04.2022)
|
||||
/// </summary>
|
||||
public partial class User
|
||||
public class User
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the created (ab)
|
||||
/// </summary>
|
||||
public DateTime Created { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the encrypted password (ab)
|
||||
/// </summary>
|
||||
public string EncryptedPassword { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the force logout (ab)
|
||||
/// </summary>
|
||||
public bool ForceLogout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the groups (ab)
|
||||
/// </summary>
|
||||
public string Groups { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the groups list (ab)
|
||||
/// </summary>
|
||||
@@ -27,6 +48,26 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
set => Groups = string.Join(",", value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the id (ab)
|
||||
/// </summary>
|
||||
[Key] public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the interactions (ab)
|
||||
/// </summary>
|
||||
public IList<Interaction> Interactions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the mail (ab)
|
||||
/// </summary>
|
||||
public string Mail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the name (ab)
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the password (ab)
|
||||
/// </summary>
|
||||
@@ -37,6 +78,16 @@ namespace FoodsharingSiegen.Contracts.Entity
|
||||
set => EncryptedPassword = Cryptor.Encrypt(value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the type (ab)
|
||||
/// </summary>
|
||||
public UserType Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the verified (ab)
|
||||
/// </summary>
|
||||
public bool Verified { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Method Clone
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// This is auto-generated code.
|
||||
//------------------------------------------------------------------------------
|
||||
// This code was generated by Entity Developer tool using EF Core template.
|
||||
@@ -18,11 +18,26 @@ using System.Linq.Expressions;
|
||||
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// The user group enum
|
||||
/// </summary>
|
||||
public enum UserGroup : int
|
||||
{
|
||||
/// <summary>
|
||||
/// The read only user group
|
||||
/// </summary>
|
||||
ReadOnly = 100,
|
||||
/// <summary>
|
||||
/// The welcome team user group
|
||||
/// </summary>
|
||||
WelcomeTeam = 200,
|
||||
/// <summary>
|
||||
/// The store manager user group
|
||||
/// </summary>
|
||||
StoreManager = 300,
|
||||
/// <summary>
|
||||
/// The ambassador user group
|
||||
/// </summary>
|
||||
Ambassador = 400
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//------------------------------------------------------------------------------
|
||||
//------------------------------------------------------------------------------
|
||||
// This is auto-generated code.
|
||||
//------------------------------------------------------------------------------
|
||||
// This code was generated by Entity Developer tool using EF Core template.
|
||||
@@ -18,11 +18,22 @@ using System.Linq.Expressions;
|
||||
|
||||
namespace FoodsharingSiegen.Contracts.Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// The user type enum
|
||||
/// </summary>
|
||||
public enum UserType : int
|
||||
{
|
||||
/// <summary>
|
||||
/// The unverified user type
|
||||
/// </summary>
|
||||
Unverified = 100,
|
||||
/// <summary>
|
||||
/// The user user type
|
||||
/// </summary>
|
||||
User = 200,
|
||||
/// <summary>
|
||||
/// The admin user type
|
||||
/// </summary>
|
||||
Admin = 300,
|
||||
nix = 50
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,170 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// This is auto-generated code.
|
||||
//------------------------------------------------------------------------------
|
||||
// This code was generated by Entity Developer tool using EF Core template.
|
||||
// Code is generated on: 11.04.2022 17:16:51
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Data.Common;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Internal;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using FoodsharingSiegen.Contracts.Entity;
|
||||
|
||||
namespace FoodsharingSiegen.Server.Data
|
||||
{
|
||||
|
||||
public partial class FsContext : DbContext
|
||||
{
|
||||
|
||||
public FsContext() :
|
||||
base()
|
||||
{
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
public FsContext(DbContextOptions<FsContext> options) :
|
||||
base(options)
|
||||
{
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if (!optionsBuilder.IsConfigured ||
|
||||
(!optionsBuilder.Options.Extensions.OfType<RelationalOptionsExtension>().Any(ext => !string.IsNullOrEmpty(ext.ConnectionString) || ext.Connection != null) &&
|
||||
!optionsBuilder.Options.Extensions.Any(ext => !(ext is RelationalOptionsExtension) && !(ext is CoreOptionsExtension))))
|
||||
{
|
||||
}
|
||||
CustomizeConfiguration(ref optionsBuilder);
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
||||
partial void CustomizeConfiguration(ref DbContextOptionsBuilder optionsBuilder);
|
||||
|
||||
public virtual DbSet<User> Users
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public virtual DbSet<Prospect> Prospects
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public virtual DbSet<Interaction> Interactions
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
this.UserMapping(modelBuilder);
|
||||
this.CustomizeUserMapping(modelBuilder);
|
||||
|
||||
this.ProspectMapping(modelBuilder);
|
||||
this.CustomizeProspectMapping(modelBuilder);
|
||||
|
||||
this.InteractionMapping(modelBuilder);
|
||||
this.CustomizeInteractionMapping(modelBuilder);
|
||||
|
||||
RelationshipsMapping(modelBuilder);
|
||||
CustomizeMapping(ref modelBuilder);
|
||||
}
|
||||
|
||||
#region User Mapping
|
||||
|
||||
private void UserMapping(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<User>().ToTable(@"Users");
|
||||
modelBuilder.Entity<User>().Property(x => x.Id).HasColumnName(@"Id").IsRequired().ValueGeneratedOnAdd();
|
||||
modelBuilder.Entity<User>().Property(x => x.Mail).HasColumnName(@"Mail").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<User>().Property(x => x.Type).HasColumnName(@"Type").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<User>().Property(x => x.Verified).HasColumnName(@"Verified").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<User>().Property(x => x.Name).HasColumnName(@"Name").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<User>().Property(x => x.Created).HasColumnName(@"Created").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<User>().Property(x => x.EncryptedPassword).HasColumnName(@"EncryptedPassword").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<User>().Property(x => x.Groups).HasColumnName(@"Groups").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<User>().Property(x => x.ForceLogout).HasColumnName(@"ForceLogout").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<User>().HasKey(@"Id");
|
||||
}
|
||||
|
||||
partial void CustomizeUserMapping(ModelBuilder modelBuilder);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Prospect Mapping
|
||||
|
||||
private void ProspectMapping(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<Prospect>().ToTable(@"Prospects");
|
||||
modelBuilder.Entity<Prospect>().Property(x => x.Id).HasColumnName(@"Id").IsRequired().ValueGeneratedOnAdd();
|
||||
modelBuilder.Entity<Prospect>().Property(x => x.FsId).HasColumnName(@"FsId").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<Prospect>().Property(x => x.Name).HasColumnName(@"Name").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<Prospect>().Property(x => x.Created).HasColumnName(@"Created").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<Prospect>().Property(x => x.Memo).HasColumnName(@"Memo").ValueGeneratedNever();
|
||||
modelBuilder.Entity<Prospect>().HasKey(@"Id");
|
||||
}
|
||||
|
||||
partial void CustomizeProspectMapping(ModelBuilder modelBuilder);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Interaction Mapping
|
||||
|
||||
private void InteractionMapping(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<Interaction>().ToTable(@"Interactions");
|
||||
modelBuilder.Entity<Interaction>().Property(x => x.Id).HasColumnName(@"Id").IsRequired().ValueGeneratedOnAdd();
|
||||
modelBuilder.Entity<Interaction>().Property(x => x.UserId).HasColumnName(@"UserId").ValueGeneratedNever();
|
||||
modelBuilder.Entity<Interaction>().Property(x => x.Date).HasColumnName(@"Date").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<Interaction>().Property(x => x.Info).HasColumnName(@"Info").ValueGeneratedNever();
|
||||
modelBuilder.Entity<Interaction>().Property(x => x.Type).HasColumnName(@"Type").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<Interaction>().Property(x => x.ProspectId).HasColumnName(@"ProspectId").ValueGeneratedNever();
|
||||
modelBuilder.Entity<Interaction>().Property(x => x.Alert).HasColumnName(@"Alert").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<Interaction>().Property(x => x.NotNeeded).HasColumnName(@"NotNeeded").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<Interaction>().Property(x => x.Created).HasColumnName(@"Created").IsRequired().ValueGeneratedNever();
|
||||
modelBuilder.Entity<Interaction>().HasKey(@"Id");
|
||||
}
|
||||
|
||||
partial void CustomizeInteractionMapping(ModelBuilder modelBuilder);
|
||||
|
||||
#endregion
|
||||
|
||||
private void RelationshipsMapping(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<User>().HasMany(x => x.Interactions).WithOne(op => op.User).HasForeignKey(@"UserId").IsRequired(true);
|
||||
|
||||
modelBuilder.Entity<Prospect>().HasMany(x => x.Interactions).WithOne(op => op.Prospect).HasForeignKey(@"ProspectId").IsRequired(true);
|
||||
|
||||
modelBuilder.Entity<Interaction>().HasOne(x => x.User).WithMany(op => op.Interactions).HasForeignKey(@"UserId").IsRequired(true);
|
||||
modelBuilder.Entity<Interaction>().HasOne(x => x.Prospect).WithMany(op => op.Interactions).HasForeignKey(@"ProspectId").IsRequired(true);
|
||||
}
|
||||
|
||||
partial void CustomizeMapping(ref ModelBuilder modelBuilder);
|
||||
|
||||
public bool HasChanges()
|
||||
{
|
||||
return ChangeTracker.Entries().Any(e => e.State == Microsoft.EntityFrameworkCore.EntityState.Added || e.State == Microsoft.EntityFrameworkCore.EntityState.Modified || e.State == Microsoft.EntityFrameworkCore.EntityState.Deleted);
|
||||
}
|
||||
|
||||
partial void OnCreated();
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,99 @@
|
||||
namespace FoodsharingSiegen.Server.Data
|
||||
{
|
||||
using FoodsharingSiegen.Contracts.Entity;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
|
||||
public partial class FsContext
|
||||
namespace FoodsharingSiegen.Server.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// The fs context class (a. beging, 21.05.2022)
|
||||
/// </summary>
|
||||
/// <seealso cref="DbContext"/>
|
||||
public class FsContext : DbContext
|
||||
{
|
||||
partial void OnCreated()
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the interactions (ab)
|
||||
/// </summary>
|
||||
public DbSet<Interaction> Interactions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the prospects (ab)
|
||||
/// </summary>
|
||||
public DbSet<Prospect> Prospects { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the users (ab)
|
||||
/// </summary>
|
||||
public DbSet<User> Users { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Setup/Teardown
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FsContext"/> class
|
||||
/// </summary>
|
||||
public FsContext() :
|
||||
base()
|
||||
{
|
||||
Database.EnsureCreated();
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FsContext"/> class
|
||||
/// </summary>
|
||||
/// <param name="options">The options (ab)</param>
|
||||
public FsContext(DbContextOptions<FsContext> options) :
|
||||
base(options)
|
||||
{
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Override OnConfiguring
|
||||
|
||||
/// <summary>
|
||||
/// Ons the configuring using the specified options builder (a. beging, 21.05.2022)
|
||||
/// </summary>
|
||||
/// <param name="optionsBuilder">The options builder</param>
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if (!optionsBuilder.IsConfigured ||
|
||||
(!optionsBuilder.Options.Extensions.OfType<RelationalOptionsExtension>().Any(ext => !string.IsNullOrEmpty(ext.ConnectionString) || ext.Connection != null) &&
|
||||
!optionsBuilder.Options.Extensions.Any(ext => !(ext is RelationalOptionsExtension) && !(ext is CoreOptionsExtension))))
|
||||
{
|
||||
}
|
||||
|
||||
base.OnConfiguring(optionsBuilder);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Method HasChanges
|
||||
|
||||
/// <summary>
|
||||
/// Describes whether this instance has changes
|
||||
/// </summary>
|
||||
/// <returns>The bool</returns>
|
||||
public bool HasChanges()
|
||||
{
|
||||
return ChangeTracker.Entries().Any(e => e.State == Microsoft.EntityFrameworkCore.EntityState.Added || e.State == Microsoft.EntityFrameworkCore.EntityState.Modified || e.State == Microsoft.EntityFrameworkCore.EntityState.Deleted);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method OnCreated
|
||||
|
||||
/// <summary>
|
||||
/// Ons the created (a. beging, 21.05.2022)
|
||||
/// </summary>
|
||||
private void OnCreated()
|
||||
{
|
||||
// Database.EnsureCreated();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -31,10 +31,10 @@ namespace FoodsharingSiegen.Server.Data.Service
|
||||
{
|
||||
try
|
||||
{
|
||||
var targetProspect = await Context.Prospects.Include(x => x.Interactions).FirstOrDefaultAsync(x => x.Id == interaction.ProspectId);
|
||||
var targetProspect = await Context.Prospects.Include(x => x.Interactions).FirstOrDefaultAsync(x => x.Id == interaction.ProspectID);
|
||||
if (targetProspect == null) return new OperationResult<Interaction>(new Exception("Invalid prospect id"));
|
||||
|
||||
interaction.ProspectId = Guid.Empty;
|
||||
interaction.ProspectID = Guid.Empty;
|
||||
interaction.Created = DateTime.UtcNow;
|
||||
|
||||
targetProspect.Interactions.Add(interaction);
|
||||
|
||||
@@ -78,14 +78,14 @@ namespace FoodsharingSiegen.Server.Dialogs
|
||||
{
|
||||
Type = type,
|
||||
Date = DateTime.UtcNow,
|
||||
ProspectId = prospectId.Value
|
||||
ProspectID = prospectId.Value
|
||||
};
|
||||
await ModalReference.Show();
|
||||
}
|
||||
|
||||
private async Task AddInteraction()
|
||||
{
|
||||
Interaction.UserId = SelectedUser;
|
||||
Interaction.UserID = SelectedUser;
|
||||
|
||||
await OnAdd.InvokeAsync(Interaction);
|
||||
await ModalReference.Hide();
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
[DbContext(typeof(FsContext))]
|
||||
[Migration("20220401142848_Init")]
|
||||
partial class Init
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Date");
|
||||
|
||||
b.Property<Guid>("ProspectId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProspectId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProspectId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Interactions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<int>("FsId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("FsId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<Guid>("ProgressId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProgressId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Prospects", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<string>("Mail")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Mail");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Verified");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("ProspectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Prospect");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
public partial class asd : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "Created",
|
||||
table: "Prospects",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Info",
|
||||
table: "Interactions",
|
||||
type: "TEXT",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Created",
|
||||
table: "Prospects");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Info",
|
||||
table: "Interactions");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,157 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
[DbContext(typeof(FsContext))]
|
||||
[Migration("20220401171855_asdk")]
|
||||
partial class asdk
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Date");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Info");
|
||||
|
||||
b.Property<Guid>("ProspectId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProspectId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProspectId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Interactions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<int>("FsId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("FsId");
|
||||
|
||||
b.Property<string>("Memo")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Memo");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<Guid>("ProgressId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProgressId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Prospects", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<string>("Mail")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Mail");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Verified");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("ProspectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Prospect");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
public partial class asdk : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Memo",
|
||||
table: "Prospects",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Memo",
|
||||
table: "Prospects");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
[DbContext(typeof(FsContext))]
|
||||
[Migration("20220402121638_memonull")]
|
||||
partial class memonull
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Date");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Info");
|
||||
|
||||
b.Property<Guid>("ProspectId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProspectId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProspectId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Interactions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<int>("FsId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("FsId");
|
||||
|
||||
b.Property<string>("Memo")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Memo");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<Guid>("ProgressId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProgressId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Prospects", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<string>("Mail")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Mail");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Verified");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("ProspectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Prospect");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
public partial class memonull : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Memo",
|
||||
table: "Prospects",
|
||||
type: "TEXT",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Memo",
|
||||
table: "Prospects",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "",
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
[DbContext(typeof(FsContext))]
|
||||
[Migration("20220402141453_userpw")]
|
||||
partial class userpw
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Date");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Info");
|
||||
|
||||
b.Property<Guid>("ProspectId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProspectId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProspectId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Interactions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<int>("FsId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("FsId");
|
||||
|
||||
b.Property<string>("Memo")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Memo");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<Guid>("ProgressId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProgressId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Prospects", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<string>("EncryptedPassword")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("EncryptedPassword");
|
||||
|
||||
b.Property<string>("Mail")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Mail");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Verified");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("ProspectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Prospect");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
public partial class userpw : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "EncryptedPassword",
|
||||
table: "Users",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "EncryptedPassword",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
[DbContext(typeof(FsContext))]
|
||||
[Migration("20220404113700_notneeded")]
|
||||
partial class notneeded
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Date");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Info");
|
||||
|
||||
b.Property<bool>("NotNeeded")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("NotNeeded");
|
||||
|
||||
b.Property<Guid>("ProspectId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProspectId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProspectId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Interactions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<int>("FsId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("FsId");
|
||||
|
||||
b.Property<string>("Memo")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Memo");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<Guid>("ProgressId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProgressId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Prospects", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<string>("EncryptedPassword")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("EncryptedPassword");
|
||||
|
||||
b.Property<string>("Mail")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Mail");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Verified");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("ProspectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Prospect");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
public partial class notneeded : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "NotNeeded",
|
||||
table: "Interactions",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "NotNeeded",
|
||||
table: "Interactions");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,169 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
[DbContext(typeof(FsContext))]
|
||||
[Migration("20220404113848_intercreated")]
|
||||
partial class intercreated
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Date");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Info");
|
||||
|
||||
b.Property<bool>("NotNeeded")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("NotNeeded");
|
||||
|
||||
b.Property<Guid>("ProspectId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProspectId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProspectId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Interactions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<int>("FsId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("FsId");
|
||||
|
||||
b.Property<string>("Memo")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Memo");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<Guid>("ProgressId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProgressId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Prospects", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<string>("EncryptedPassword")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("EncryptedPassword");
|
||||
|
||||
b.Property<string>("Mail")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Mail");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Verified");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("ProspectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Prospect");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
public partial class intercreated : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "Created",
|
||||
table: "Interactions",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Created",
|
||||
table: "Interactions");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
[DbContext(typeof(FsContext))]
|
||||
[Migration("20220404143914_interalert")]
|
||||
partial class interalert
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<bool>("Alert")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Alert");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Date");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Info");
|
||||
|
||||
b.Property<bool>("NotNeeded")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("NotNeeded");
|
||||
|
||||
b.Property<Guid>("ProspectId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProspectId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProspectId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Interactions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<int>("FsId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("FsId");
|
||||
|
||||
b.Property<string>("Memo")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Memo");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<Guid>("ProgressId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProgressId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Prospects", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<string>("EncryptedPassword")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("EncryptedPassword");
|
||||
|
||||
b.Property<string>("Mail")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Mail");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Verified");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("ProspectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Prospect");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
public partial class interalert : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "Alert",
|
||||
table: "Interactions",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Alert",
|
||||
table: "Interactions");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
[DbContext(typeof(FsContext))]
|
||||
[Migration("20220405143853_usergroups")]
|
||||
partial class usergroups
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<bool>("Alert")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Alert");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Date");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Info");
|
||||
|
||||
b.Property<bool>("NotNeeded")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("NotNeeded");
|
||||
|
||||
b.Property<Guid>("ProspectId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProspectId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProspectId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Interactions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<int>("FsId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("FsId");
|
||||
|
||||
b.Property<string>("Memo")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Memo");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<Guid>("ProgressId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProgressId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Prospects", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<string>("EncryptedPassword")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("EncryptedPassword");
|
||||
|
||||
b.Property<string>("Groups")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Groups");
|
||||
|
||||
b.Property<string>("Mail")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Mail");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Verified");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("ProspectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Prospect");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
public partial class usergroups : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Groups",
|
||||
table: "Users",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Groups",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FoodsharingSiegen.Server.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
[DbContext(typeof(FsContext))]
|
||||
[Migration("20220411114633_forcelogout")]
|
||||
partial class forcelogout
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "6.0.1");
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<bool>("Alert")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Alert");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Date");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Info");
|
||||
|
||||
b.Property<bool>("NotNeeded")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("NotNeeded");
|
||||
|
||||
b.Property<Guid>("ProspectId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProspectId");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("UserId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProspectId");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
|
||||
b.ToTable("Interactions", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<int>("FsId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("FsId");
|
||||
|
||||
b.Property<string>("Memo")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Memo");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<Guid>("ProgressId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProgressId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Prospects", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
|
||||
b.Property<string>("EncryptedPassword")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("EncryptedPassword");
|
||||
|
||||
b.Property<bool>("ForceLogout")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("ForceLogout");
|
||||
|
||||
b.Property<string>("Groups")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Groups");
|
||||
|
||||
b.Property<string>("Mail")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Mail");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Verified");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("ProspectId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Prospect");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Navigation("Interactions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
public partial class forcelogout : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "ForceLogout",
|
||||
table: "Users",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ForceLogout",
|
||||
table: "Users");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
[DbContext(typeof(FsContext))]
|
||||
[Migration("20220401164353_asd")]
|
||||
partial class asd
|
||||
[Migration("20220521114808_init")]
|
||||
partial class init
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
@@ -23,112 +23,115 @@ namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Alert")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Date");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Info");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<Guid>("ProspectId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProspectId");
|
||||
b.Property<bool>("NotNeeded")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<Guid>("ProspectID")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("UserId");
|
||||
b.Property<Guid>("UserID")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProspectId");
|
||||
b.HasIndex("ProspectID");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("Interactions", (string)null);
|
||||
b.ToTable("Interactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("FsId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("FsId");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Memo")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<Guid>("ProgressId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProgressId");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Prospects", (string)null);
|
||||
b.ToTable("Prospects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EncryptedPassword")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("ForceLogout")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Groups")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Mail")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Mail");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Verified");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("ProspectId")
|
||||
.HasForeignKey("ProspectID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("UserId")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
@@ -5,7 +5,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
public partial class Init : Migration
|
||||
public partial class init : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
@@ -16,7 +16,8 @@ namespace FoodsharingSiegen.Server.Migrations
|
||||
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
FsId = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: false),
|
||||
ProgressId = table.Column<Guid>(type: "TEXT", nullable: false)
|
||||
Created = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
Memo = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -32,7 +33,10 @@ namespace FoodsharingSiegen.Server.Migrations
|
||||
Type = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
Verified = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Name = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Created = table.Column<DateTime>(type: "TEXT", nullable: false)
|
||||
Created = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
EncryptedPassword = table.Column<string>(type: "TEXT", nullable: false),
|
||||
Groups = table.Column<string>(type: "TEXT", nullable: false),
|
||||
ForceLogout = table.Column<bool>(type: "INTEGER", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
@@ -44,37 +48,41 @@ namespace FoodsharingSiegen.Server.Migrations
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
UserID = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
Date = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||
UserId = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
Info = table.Column<string>(type: "TEXT", nullable: true),
|
||||
Type = table.Column<int>(type: "INTEGER", nullable: false),
|
||||
ProspectId = table.Column<Guid>(type: "TEXT", nullable: false)
|
||||
ProspectID = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||
Alert = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
NotNeeded = table.Column<bool>(type: "INTEGER", nullable: false),
|
||||
Created = table.Column<DateTime>(type: "TEXT", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Interactions", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Interactions_Prospects_ProspectId",
|
||||
column: x => x.ProspectId,
|
||||
name: "FK_Interactions_Prospects_ProspectID",
|
||||
column: x => x.ProspectID,
|
||||
principalTable: "Prospects",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Interactions_Users_UserId",
|
||||
column: x => x.UserId,
|
||||
name: "FK_Interactions_Users_UserID",
|
||||
column: x => x.UserID,
|
||||
principalTable: "Users",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Interactions_ProspectId",
|
||||
name: "IX_Interactions_ProspectID",
|
||||
table: "Interactions",
|
||||
column: "ProspectId");
|
||||
column: "ProspectID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Interactions_UserId",
|
||||
name: "IX_Interactions_UserID",
|
||||
table: "Interactions",
|
||||
column: "UserId");
|
||||
column: "UserID");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
@@ -21,142 +21,115 @@ namespace FoodsharingSiegen.Server.Migrations
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("Alert")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Alert");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("Date")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Date");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Info")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Info");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("NotNeeded")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("NotNeeded");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<Guid>("ProspectId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProspectId");
|
||||
b.Property<Guid>("ProspectID")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("UserId");
|
||||
b.Property<Guid>("UserID")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ProspectId");
|
||||
b.HasIndex("ProspectID");
|
||||
|
||||
b.HasIndex("UserId");
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("Interactions", (string)null);
|
||||
b.ToTable("Interactions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Prospect", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("FsId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("FsId");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Memo")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Memo");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
|
||||
b.Property<Guid>("ProgressId")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("ProgressId");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Prospects", (string)null);
|
||||
b.ToTable("Prospects");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.User", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Id");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<DateTime>("Created")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Created");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("EncryptedPassword")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("EncryptedPassword");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("ForceLogout")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("ForceLogout");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Groups")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Groups");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Mail")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Mail");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("Name");
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int>("Type")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Type");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("Verified")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("Verified");
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Users", (string)null);
|
||||
b.ToTable("Users");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FoodsharingSiegen.Contracts.Entity.Interaction", b =>
|
||||
{
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.Prospect", "Prospect")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("ProspectId")
|
||||
.HasForeignKey("ProspectID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("FoodsharingSiegen.Contracts.Entity.User", "User")
|
||||
.WithMany("Interactions")
|
||||
.HasForeignKey("UserId")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user