feat: ingredient product

This commit is contained in:
ferdiansyah783
2025-08-12 21:29:24 +07:00
parent c3780af341
commit f3dfad4cb3
36 changed files with 1731 additions and 465 deletions
+33
View File
@@ -0,0 +1,33 @@
export interface OrganizationRequest {
organization_name: string; // required, 1255 chars
organization_email?: string | null; // optional, must be a valid email if present
organization_phone_number?: string | null; // optional
plan_type: 'basic' | 'premium' | 'enterprise'; // required, enum
admin_name: string; // required, 1255 chars
admin_email: string; // required, email
admin_password: string; // required, min length 6
outlet_name: string; // required, 1255 chars
outlet_address?: string | null; // optional
outlet_timezone?: string | null; // optional
outlet_currency: string; // required, exactly 3 chars (ISO currency code)
}
export interface Organization {
id: string;
name: string;
email: string | null;
phone_number: string | null;
plan_type: "basic" | "enterprise"; // can be extended if there are more plan types
created_at: string; // ISO date string
updated_at: string; // ISO date string
}
export interface Organizations {
organizations: Organization[];
total_count: number;
page: number;
limit: number;
total_pages: number;
}
+2 -3
View File
@@ -5,7 +5,7 @@ export type User = {
name: string;
email: string;
role: string;
permissions: Record<string, unknown>;
permissions: Record<string, boolean>;
is_active: boolean;
created_at: string; // ISO date string
updated_at: string; // ISO date string
@@ -24,12 +24,11 @@ export type Users = {
};
export type UserRequest = {
organization_id: string;
outlet_id: string;
name: string;
email: string;
password: string;
role: string;
permissions: Record<string, unknown>;
permissions: Record<string, boolean>;
is_active: boolean;
}