Files
PowderCoatingLogix/src/PowderCoating.Core/Entities/FormulaLibraryImport.cs
T
spouliot ca7e905832 Add Community Formula Library feature
Companies can now share their custom formula templates to a platform-wide
community library. Other tenants can browse, preview, and import formulas
as independent local copies. Includes attribution (source company name),
"Inspired by" lineage for re-contributed formulas, import counts, own-formula
badge, cascade diagram nullification, and AI assistant + help docs updates.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 21:54:51 -04:00

20 lines
912 B
C#

namespace PowderCoating.Core.Entities;
/// <summary>
/// Records that a company imported a specific FormulaLibraryItem into their local template library.
/// Tenant-scoped via BaseEntity.CompanyId. One row per (company, library item) — re-importing the
/// same item overwrites the existing row rather than creating a duplicate.
/// </summary>
public class FormulaLibraryImport : BaseEntity
{
public int FormulaLibraryItemId { get; set; }
public virtual FormulaLibraryItem FormulaLibraryItem { get; set; } = null!;
public string ImportedByUserId { get; set; } = string.Empty;
public DateTime ImportedAt { get; set; } = DateTime.UtcNow;
/// <summary>The CustomItemTemplate row created in this company's local library on import.</summary>
public int ResultingCustomItemTemplateId { get; set; }
public virtual CustomItemTemplate ResultingCustomItemTemplate { get; set; } = null!;
}