Sync products with old e5 CRM
This commit is contained in:
@@ -6,12 +6,15 @@ namespace Bimix.Infrastructure.Data;
|
||||
public class BimixDbContext(DbContextOptions<BimixDbContext> options) : DbContext(options)
|
||||
{
|
||||
public DbSet<Product> Products { get; set; }
|
||||
public DbSet<SyncState> SyncStates { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
modelBuilder.Entity<Product>().HasKey(p => p.Id);
|
||||
modelBuilder.Entity<Product>().Property(p => p.Name).IsRequired().HasMaxLength(200);
|
||||
modelBuilder.Entity<Product>().HasKey(x => x.Id);
|
||||
modelBuilder.Entity<Product>().Property(x => x.Name).IsRequired().HasMaxLength(512);
|
||||
|
||||
modelBuilder.Entity<SyncState>().HasKey((x => x.Entity));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user