added unique check for barcode

This commit is contained in:
2026-06-10 20:03:07 -05:00
parent 2e927efe0a
commit f77f9fb9ea
6 changed files with 301 additions and 3 deletions
+2 -1
View File
@@ -8,10 +8,11 @@ public class BarkContext(DbContextOptions<BarkContext> options) : DbContext(opti
public DbSet<ItemStatus> ItemStatus { get; set; }
}
[Index(nameof(Barcode), IsUnique = true)]
public class InventoryItems
{
public int Id {get; set;}
public int Barcode {get; set;}
public string Barcode {get; set;}
public string Name { get; set; }
public string Brand { get; set; }
public string? SerialNumber { get; set; }