App. Docs
Supplier
Holds supplier details and export formatting preferences. Primarily used for filtering and export generation.
Overview
A supplier contains contact information and export-related settings. It helps standardize data exported to external systems and makes it easy to filter products and analytics by supplier.
Attributes
1type Supplier = {
2  // Identity & audit
3  id: string; // uuid
4  modifiedAt?: Date; // @updatedAt
5  modifiedById?: string; // uuid
6  modifiedByEmail?: string;
7  modifiedByEndpoint?: string;
8
9  // Company scoping
10  companyId: string; // uuid
11  company: Company; // @relation("assetOfCompany")
12
13  // Core
14  name: string;
15  address?: Record<string, unknown> | null; // json
16  contactEmail?: string | null;
17  contactNumber?: string | null;
18  costCurrencyCode?: string | null;
19
20  // Media
21  logoId?: string; // uuid
22  logo?: File | null; // @relation("supplierLogo")
23
24  // Relations
25  products: Product[];
26
27  // Notes (DB constraints)
28  // @@unique([companyId, id])
29  // @@index([companyId])
30}