Path: redb-route/demo/SerialNumbersDemo/SerialNumbers.Domain/Entities/Product.cs
Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route
Page: https://redbase.app/src/dev-2026-12-06/redb-route/demo/SerialNumbersDemo/SerialNumbers.Domain/Entities/Product.cs
----
using redb.Core.Attributes;
using SerialNumbers.Domain.Services;
namespace SerialNumbers.Domain.Entities;
///
/// A product serial numbers are issued for. The GTIN is also the object's unique key
/// (ValueUnique), which is what the request lookup goes through.
///
[RedbScheme(Name = "SerialNumbers.Product")]
public sealed class Product
{
public string Gtin { get; set; } = "";
public string Name { get; set; } = "";
///
/// One of . A new product starts as a draft: requests for it wait
/// until someone activates it.
///
public string Status { get; set; } = ProductStatuses.Draft;
/// The largest quantity a single request may ask for.
public int MaxPerRequest { get; set; }
/// How many serial numbers may be issued for this product in one calendar year.
public long AnnualQuota { get; set; }
}