@@ -322,6 +322,61 @@ export type Database = {
322322 } ,
323323 ]
324324 }
325+ batch_operations : {
326+ Row : {
327+ batch_id : string
328+ created_at : string
329+ id : string
330+ operation_id : string
331+ quantity_in_batch : number | null
332+ sequence_in_batch : number | null
333+ tenant_id : string
334+ updated_at : string | null
335+ }
336+ Insert : {
337+ batch_id : string
338+ created_at ?: string
339+ id ?: string
340+ operation_id : string
341+ quantity_in_batch ?: number | null
342+ sequence_in_batch ?: number | null
343+ tenant_id : string
344+ updated_at ?: string | null
345+ }
346+ Update : {
347+ batch_id ?: string
348+ created_at ?: string
349+ id ?: string
350+ operation_id ?: string
351+ quantity_in_batch ?: number | null
352+ sequence_in_batch ?: number | null
353+ tenant_id ?: string
354+ updated_at ?: string | null
355+ }
356+ Relationships : [
357+ {
358+ foreignKeyName : "batch_operations_batch_id_fkey"
359+ columns : [ "batch_id" ]
360+ isOneToOne : false
361+ referencedRelation : "operation_batches"
362+ referencedColumns : [ "id" ]
363+ } ,
364+ {
365+ foreignKeyName : "batch_operations_operation_id_fkey"
366+ columns : [ "operation_id" ]
367+ isOneToOne : true
368+ referencedRelation : "operations"
369+ referencedColumns : [ "id" ]
370+ } ,
371+ {
372+ foreignKeyName : "batch_operations_tenant_id_fkey"
373+ columns : [ "tenant_id" ]
374+ isOneToOne : false
375+ referencedRelation : "tenants"
376+ referencedColumns : [ "id" ]
377+ } ,
378+ ]
379+ }
325380 billing_waitlist : {
326381 Row : {
327382 company_name : string
@@ -1921,6 +1976,117 @@ export type Database = {
19211976 } ,
19221977 ]
19231978 }
1979+ operation_batches : {
1980+ Row : {
1981+ actual_time : number | null
1982+ batch_number : string
1983+ batch_type : Database [ "public" ] [ "Enums" ] [ "batch_type" ]
1984+ cell_id : string
1985+ completed_at : string | null
1986+ completed_by : string | null
1987+ created_at : string
1988+ created_by : string | null
1989+ estimated_time : number | null
1990+ external_id : string | null
1991+ external_source : string | null
1992+ id : string
1993+ material : string | null
1994+ nesting_metadata : Json | null
1995+ notes : string | null
1996+ operations_count : number
1997+ started_at : string | null
1998+ started_by : string | null
1999+ status : Database [ "public" ] [ "Enums" ] [ "batch_status" ]
2000+ tenant_id : string
2001+ thickness_mm : number | null
2002+ updated_at : string | null
2003+ }
2004+ Insert : {
2005+ actual_time ?: number | null
2006+ batch_number : string
2007+ batch_type ?: Database [ "public" ] [ "Enums" ] [ "batch_type" ]
2008+ cell_id : string
2009+ completed_at ?: string | null
2010+ completed_by ?: string | null
2011+ created_at ?: string
2012+ created_by ?: string | null
2013+ estimated_time ?: number | null
2014+ external_id ?: string | null
2015+ external_source ?: string | null
2016+ id ?: string
2017+ material ?: string | null
2018+ nesting_metadata ?: Json | null
2019+ notes ?: string | null
2020+ operations_count ?: number
2021+ started_at ?: string | null
2022+ started_by ?: string | null
2023+ status ?: Database [ "public" ] [ "Enums" ] [ "batch_status" ]
2024+ tenant_id : string
2025+ thickness_mm ?: number | null
2026+ updated_at ?: string | null
2027+ }
2028+ Update : {
2029+ actual_time ?: number | null
2030+ batch_number ?: string
2031+ batch_type ?: Database [ "public" ] [ "Enums" ] [ "batch_type" ]
2032+ cell_id ?: string
2033+ completed_at ?: string | null
2034+ completed_by ?: string | null
2035+ created_at ?: string
2036+ created_by ?: string | null
2037+ estimated_time ?: number | null
2038+ external_id ?: string | null
2039+ external_source ?: string | null
2040+ id ?: string
2041+ material ?: string | null
2042+ nesting_metadata ?: Json | null
2043+ notes ?: string | null
2044+ operations_count ?: number
2045+ started_at ?: string | null
2046+ started_by ?: string | null
2047+ status ?: Database [ "public" ] [ "Enums" ] [ "batch_status" ]
2048+ tenant_id ?: string
2049+ thickness_mm ?: number | null
2050+ updated_at ?: string | null
2051+ }
2052+ Relationships : [
2053+ {
2054+ foreignKeyName : "operation_batches_cell_id_fkey"
2055+ columns : [ "cell_id" ]
2056+ isOneToOne : false
2057+ referencedRelation : "cells"
2058+ referencedColumns : [ "id" ]
2059+ } ,
2060+ {
2061+ foreignKeyName : "operation_batches_completed_by_fkey"
2062+ columns : [ "completed_by" ]
2063+ isOneToOne : false
2064+ referencedRelation : "profiles"
2065+ referencedColumns : [ "id" ]
2066+ } ,
2067+ {
2068+ foreignKeyName : "operation_batches_created_by_fkey"
2069+ columns : [ "created_by" ]
2070+ isOneToOne : false
2071+ referencedRelation : "profiles"
2072+ referencedColumns : [ "id" ]
2073+ } ,
2074+ {
2075+ foreignKeyName : "operation_batches_started_by_fkey"
2076+ columns : [ "started_by" ]
2077+ isOneToOne : false
2078+ referencedRelation : "profiles"
2079+ referencedColumns : [ "id" ]
2080+ } ,
2081+ {
2082+ foreignKeyName : "operation_batches_tenant_id_fkey"
2083+ columns : [ "tenant_id" ]
2084+ isOneToOne : false
2085+ referencedRelation : "tenants"
2086+ referencedColumns : [ "id" ]
2087+ } ,
2088+ ]
2089+ }
19242090 operation_day_allocations : {
19252091 Row : {
19262092 cell_id : string
@@ -4106,6 +4272,18 @@ export type Database = {
41064272 Enums : {
41074273 app_role : "operator" | "admin"
41084274 assignment_status : "assigned" | "accepted" | "in_progress" | "completed"
4275+ batch_status :
4276+ | "draft"
4277+ | "ready"
4278+ | "in_progress"
4279+ | "completed"
4280+ | "cancelled"
4281+ batch_type :
4282+ | "laser_nesting"
4283+ | "tube_batch"
4284+ | "saw_batch"
4285+ | "finishing_batch"
4286+ | "general"
41094287 exception_status : "open" | "acknowledged" | "resolved" | "dismissed"
41104288 exception_type : "late" | "early" | "non_occurrence" | "exceeded" | "under"
41114289 expectation_type : "completion_time" | "duration" | "quantity" | "delivery"
@@ -4295,6 +4473,14 @@ export const Constants = {
42954473 Enums : {
42964474 app_role : [ "operator" , "admin" ] ,
42974475 assignment_status : [ "assigned" , "accepted" , "in_progress" , "completed" ] ,
4476+ batch_status : [ "draft" , "ready" , "in_progress" , "completed" , "cancelled" ] ,
4477+ batch_type : [
4478+ "laser_nesting" ,
4479+ "tube_batch" ,
4480+ "saw_batch" ,
4481+ "finishing_batch" ,
4482+ "general" ,
4483+ ] ,
42984484 exception_status : [ "open" , "acknowledged" , "resolved" , "dismissed" ] ,
42994485 exception_type : [ "late" , "early" , "non_occurrence" , "exceeded" , "under" ] ,
43004486 expectation_type : [ "completion_time" , "duration" , "quantity" , "delivery" ] ,
0 commit comments