id: https://ce-rise-models.codeberg.page/traceability-and-life-cycle-events/
name: traceability_and_life_cycle_events
title: Traceability and Life Cycle Events Data Model
description: Dynamic event-based information throughout supply chain journey for products, materials, batches, and commodities aligned with GS1 EPCIS 2.0 standard. Supports both Digital Product Passports (DPP) and Digital Material Passports (DMP).
license: https://creativecommons.org/licenses/by-nc/4.0/
version: 0.0.3

prefixes:
    linkml: https://w3id.org/linkml/
    trc: https://ce-rise-models.codeberg.page/traceability-and-life-cycle-events/
    epcis: https://ns.gs1.org/epcis/
    cbv: https://ns.gs1.org/cbv/
    schema: http://schema.org/
    iso: https://www.iso.org/
    unece: https://unece.org/trade/
    gs1: https://www.gs1.org/voc/

imports:
    - linkml:types

default_range: string

# Root class
classes:
    TraceabilityLifecycleEvents:
        description: Root container for all traceability and lifecycle events for products, materials, batches, or commodities throughout their supply chain journey
        tree_root: true
        attributes:
            entity_history:
                range: EntityHistory
                description: Foundation for all lifecycle events with complete audit trail for products, materials, batches, or commodities
                multivalued: true
            ownership_event:
                range: OwnershipEvent
                description: Legal ownership and custody transfers throughout supply chain
                multivalued: true
            value_adding_activity:
                range: ValueAddingActivityLocation
                description: Transformation and processing events that modify or enhance entities (products, materials, batches, commodities)
                multivalued: true
            actor_tracking:
                range: ActorTracking
                description: All supply chain participants and their interactions with entities (products, materials, batches, commodities)
                multivalued: true
            logistics_events:
                range: LogisticsEvents
                description: Supply chain transportation and movement tracking post-import
                multivalued: true
            reverse_logistics:
                range: ReverseLogistics
                description: End-of-life and return pathway management
                multivalued: true
            aggregation_events:
                range: AggregationEvents
                description: Packaging hierarchy operations - packing and unpacking of items into containers
                multivalued: true
            supply_chain_incidents:
                range: SupplyChainIncidents
                description: Exception events and disruptions during supply chain operations
                multivalued: true

    EntityHistory:
        description: EPCIS-compatible base event structure for complete lifecycle audit trail of products, materials, batches, or commodities
        attributes:
            event_identifier:
                range: string
                description: Unique identifier for each event - aligns with EPCIS eventID concept
                annotations:
                    sql_identifier: trc_hist_event_id
                pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"

            event_identifier_value:
                range: string
                description: Value holder for event identifier

            event_timestamp:
                range: datetime
                description: ISO 8601 timestamp with timezone - aligns with EPCIS eventTime concept
                annotations:
                    sql_identifier: trc_hist_event_timestamp
                    references: "CIRPASS"

            event_timestamp_value:
                range: string
                description: Value holder for event timestamp

            event_type:
                range: string
                description: Uses EPCIS EventType vocabulary directly - ObjectEvent TransactionEvent etc
                annotations:
                    sql_identifier: trc_hist_event_type
                    owl.filler: epcis:EventType

            event_type_value:
                range: string
                description: Value holder for event type

            event_location:
                range: string
                description: GLN or URI for location - aligns with EPCIS readPoint/bizLocation concepts
                annotations:
                    sql_identifier: trc_hist_event_location
                    owl.filler: gs1:GlobalLocationNumber
                    references: "CIRPASS; Jensen et al."
                pattern: "^(urn:epc:id:sgln:|https?://|[0-9]{13}).*"

            event_location_value:
                range: string
                description: Value holder for event location

            event_description:
                range: string
                description: Human-readable event description extends EPCIS
                annotations:
                    sql_identifier: trc_hist_event_description

            event_description_value:
                range: string
                description: Value holder for event description

            linked_entity_identifier:
                range: string
                description: EPC URI, GTIN plus serial, batch number, or lot identifier for the tracked entity (product, material, batch, commodity) - aligns with EPCIS epcList concept
                annotations:
                    sql_identifier: trc_hist_linked_entity_id
                pattern: "^(urn:epc:id:|[0-9]{14}:).*"

            linked_entity_identifier_value:
                range: string
                description: Value holder for linked entity identifier

            disposition:
                range: string
                description: Business state of objects - aligns with EPCIS disposition concept
                annotations:
                    sql_identifier: trc_hist_disposition

            disposition_value:
                range: string
                description: Value holder for disposition

            biz_step:
                range: string
                description: Uses CBV BizStep vocabulary directly
                annotations:
                    sql_identifier: trc_hist_biz_step
                    owl.filler: cbv:BizStep

            biz_step_value:
                range: string
                description: Value holder for business step

            action:
                range: string
                description: Uses EPCIS Action vocabulary directly - ADD OBSERVE DELETE
                annotations:
                    sql_identifier: trc_hist_action
                    owl.filler: epcis:Action

            action_value:
                range: string
                description: Value holder for action

            event_time_zone_offset:
                range: string
                description: Time zone offset from UTC like +01:00 or -05:00
                annotations:
                    sql_identifier: trc_hist_timezone_offset
                pattern: "^[+-][0-9]{2}:[0-9]{2}$"

            event_time_zone_offset_value:
                range: string
                description: Value holder for timezone offset

            read_point:
                range: string
                description: Specific location where event occurred EPCIS readPoint
                annotations:
                    sql_identifier: trc_hist_read_point
                    owl.filler: gs1:GlobalLocationNumber
                    references: "CIRPASS"

            read_point_value:
                range: string
                description: Value holder for read point

            biz_location:
                range: string
                description: Business location where objects are expected following event EPCIS bizLocation
                annotations:
                    sql_identifier: trc_hist_biz_location
                    owl.filler: gs1:GlobalLocationNumber
                    references: "CIRPASS"

            biz_location_value:
                range: string
                description: Value holder for business location

            error_declaration:
                range: ErrorDeclaration
                description: Declaration that this event is in error EPCIS errorDeclaration

            certification_info:
                range: uri
                multivalued: true
                description: URI references to relevant certification documents or standards
                annotations:
                    sql_identifier: trc_hist_certification_info
                    reference_type: "certification"
                    references: "King et al."

            certification_info_value:
                range: string
                description: Value holder for certification info

            sensor_metadata:
                range: string
                description: IoT sensor data using EPCIS 2.0 SensorReport structure
                annotations:
                    sql_identifier: trc_hist_sensor_metadata
                    owl.filler: epcis:SensorReport

            sensor_metadata_value:
                range: string
                description: Value holder for sensor metadata

    OwnershipEvent:
        description: Legal ownership and custody transfers extending EPCIS TransactionEvent
        attributes:
            transfer_date:
                range: datetime
                description: Precise timestamp of ownership change - aligns with EPCIS eventTime concept
                annotations:
                    sql_identifier: trc_owner_transfer_date
                    references: "CIRPASS"

            transfer_date_value:
                range: string
                description: Value holder for transfer date

            previous_owner:
                range: string
                description: Source party GLN - aligns with EPCIS source concept
                annotations:
                    sql_identifier: trc_owner_previous_owner
                    owl.filler: gs1:GlobalLocationNumber
                pattern: "^[0-9]{13}$"

            previous_owner_value:
                range: string
                description: Value holder for previous owner

            new_owner:
                range: string
                description: Destination party GLN - aligns with EPCIS destination concept
                annotations:
                    sql_identifier: trc_owner_new_owner
                    owl.filler: gs1:GlobalLocationNumber
                pattern: "^[0-9]{13}$"

            new_owner_value:
                range: string
                description: Value holder for new owner

            transfer_type:
                range: string
                description: Uses CBV Business Transaction Type vocabulary directly - po desadv inv rma etc
                annotations:
                    sql_identifier: trc_owner_transfer_type
                    owl.filler: cbv:BTT

            transfer_type_value:
                range: string
                description: Value holder for transfer type

            transfer_location:
                range: string
                description: Physical location GLN - aligns with EPCIS bizLocation concept
                annotations:
                    sql_identifier: trc_owner_transfer_location
                    owl.filler: gs1:GlobalLocationNumber
                    references: "CIRPASS"
                pattern: "^[0-9]{13}$"

            transfer_location_value:
                range: string
                description: Value holder for transfer location

            chain_of_custody_reference:
                range: uri
                multivalued: true
                description: Previous event links EPCIS extensions
                annotations:
                    sql_identifier: trc_owner_custody_chain
                    epcis_aligned: true

            chain_of_custody_reference_value:
                range: string
                description: Value holder for custody chain references

            ownership_documentation:
                range: uri
                multivalued: true
                description: Digital references EPCIS bizTransactionList URIs to documents
                annotations:
                    sql_identifier: trc_owner_documentation
                    epcis_aligned: true

            ownership_documentation_value:
                range: string
                description: Value holder for ownership documentation

            action:
                range: string
                description: EPCIS action ADD OBSERVE DELETE
                annotations:
                    sql_identifier: trc_owner_action
                    owl.filler: epcis:Action

            action_value:
                range: string
                description: Value holder for action

            linked_entity_identifier:
                range: string
                description: Reference to entities (products, materials, batches, commodities) being transferred - aligns with EPCIS epcList concept
                annotations:
                    sql_identifier: trc_owner_linked_entity
                pattern: "^(urn:epc:id:|[0-9]{14}:).*"

            linked_entity_identifier_value:
                range: string
                description: Value holder for linked entity identifier

            quantity_transferred:
                range: integer
                description: Quantity transferred using EPCIS QuantityElement structure
                annotations:
                    sql_identifier: trc_owner_quantity
                    owl.filler: epcis:QuantityElement

            quantity_transferred_value:
                range: string
                description: Value holder for quantity transferred

            transfer_value:
                range: float
                description: Monetary value of transfer
                annotations:
                    sql_identifier: trc_owner_transfer_value

            transfer_value_value:
                range: string
                description: Value holder for transfer monetary value

            currency:
                range: string
                description: Currency code for transfer value using ISO 4217 standard
                annotations:
                    sql_identifier: trc_owner_currency
                    owl.filler: iso:4217
                pattern: "^[A-Z]{3}$"

            currency_value:
                range: string
                description: Value holder for currency

            ownership_status:
                range: OwnershipStatusEnum
                description: Legal status of ownership after transfer DPP extension beyond EPCIS
                annotations:
                    sql_identifier: trc_owner_status
                    dpp_extension: true

            ownership_status_value:
                range: string
                description: Value holder for ownership status

    ValueAddingActivityLocation:
        description: Transformation and processing events extending EPCIS TransformationEvent
        attributes:
            activity_identifier:
                range: string
                description: Unique activity reference - aligns with EPCIS eventID concept
                annotations:
                    sql_identifier: trc_value_activity_id
                pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"

            activity_identifier_value:
                range: string
                description: Value holder for activity identifier

            activity_type:
                range: string
                description: Uses CBV BizStep vocabulary directly - commissioning transformation decommissioning
                annotations:
                    sql_identifier: trc_value_activity_type
                    owl.filler: cbv:BizStep

            activity_type_value:
                range: string
                description: Value holder for activity type

            activity_date:
                range: datetime
                description: When activity occurred - aligns with EPCIS eventTime concept
                annotations:
                    references: "CIRPASS"
                    sql_identifier: trc_value_activity_date

            activity_date_value:
                range: string
                description: Value holder for activity date

            facility_identifier:
                range: string
                description: GLN or OSID of processing facility
                annotations:
                    sql_identifier: trc_value_facility_id
                    owl.filler: gs1:GlobalLocationNumber
                    references: "ESPR; CIRPASS; King et al."
                pattern: "^[0-9]{13}$"

            facility_identifier_value:
                range: string
                description: Value holder for facility identifier

            process_description:
                range: string
                description: Detailed transformation process description EPCIS extension
                annotations:
                    sql_identifier: trc_value_process_desc
                    dpp_extension: true

            process_description_value:
                range: string
                description: Value holder for process description

            input_entities:
                range: string
                multivalued: true
                description: Input entities (components, materials, batches, commodities) consumed in transformation - aligns with EPCIS inputEPCList
                annotations:
                    sql_identifier: trc_value_input_entities
                    owl.filler: epcis:EPCList

            input_entities_value:
                range: string
                description: Value holder for input entities

            output_entities:
                range: string
                multivalued: true
                description: Output entities (products, materials, batches, commodities) resulting from transformation - aligns with EPCIS outputEPCList
                annotations:
                    sql_identifier: trc_value_output_entities
                    owl.filler: epcis:EPCList

            output_entities_value:
                range: string
                description: Value holder for output entities

            transformation_id:
                range: string
                description: Transformation identifier using EPCIS transformationID
                annotations:
                    sql_identifier: trc_value_transformation_id
                    owl.filler: epcis:TransformationID

            transformation_id_value:
                range: string
                description: Value holder for transformation ID

            process_step:
                range: string
                description: Specific process step within transformation EPCIS bizStep
                annotations:
                    sql_identifier: trc_value_process_step
                    epcis_cbv_aligned: true

            process_step_value:
                range: string
                description: Value holder for process step

            quality_check_performed:
                range: boolean
                description: Whether quality control was performed DPP extension
                annotations:
                    sql_identifier: trc_value_quality_check
                    dpp_extension: true

            quality_check_performed_value:
                range: string
                description: Value holder for quality check flag

            quality_check_results:
                range: string
                description: Quality control test results DPP extension
                annotations:
                    sql_identifier: trc_value_quality_results
                    dpp_extension: true
                    references: "King et al."

            quality_check_results_value:
                range: string
                description: Value holder for quality results

            process_duration:
                range: string
                description: Process duration in ISO 8601 format (e.g. PT30M for 30 minutes)
                annotations:
                    sql_identifier: trc_value_duration
                    iso_8601_duration: true
                    dpp_extension: true
                pattern: "^P(?:\\d+Y)?(?:\\d+M)?(?:\\d+W)?(?:\\d+D)?(?:T(?:\\d+H)?(?:\\d+M)?(?:\\d+(?:\\.\\d+)?S)?)?$"

            process_duration_value:
                range: string
                description: Value holder for process duration

            operator_identifier:
                range: string
                description: GLN or ID of operator performing activity
                annotations:
                    sql_identifier: trc_value_operator_id
                    references: "ESPR; CIRPASS"

            operator_identifier_value:
                range: string
                description: Value holder for operator identifier

            batch_identifier:
                range: string
                description: Batch or lot number for this processing run
                annotations:
                    sql_identifier: trc_value_batch_id

            batch_identifier_value:
                range: string
                description: Value holder for batch identifier

            value_added:
                range: float
                description: Economic value added by this activity DPP extension
                annotations:
                    sql_identifier: trc_value_added_amount
                    dpp_extension: true

            value_added_value:
                range: string
                description: Value holder for value added

            process_certification:
                range: uri
                multivalued: true
                description: URI references to process certifications ISO standards or quality systems
                annotations:
                    sql_identifier: trc_value_certifications
                    dpp_extension: true
                    reference_type: "certification"
                    references: "King et al."

            process_certification_value:
                range: string
                description: Value holder for process certifications

    ErrorDeclaration:
        description: Declaration that an event was recorded in error EPCIS errorDeclaration
        attributes:
            declaration_time:
                range: datetime
                description: When the error was declared
                annotations:
                    sql_identifier: trc_hist_error_declaration_time

            declaration_time_value:
                range: string
                description: Value holder for declaration time

            reason:
                range: string
                description: Reason for the error declaration
                annotations:
                    sql_identifier: trc_hist_error_reason

            reason_value:
                range: string
                description: Value holder for error reason

            corrective_event_ids:
                range: string
                multivalued: true
                description: IDs of events that correct this error
                annotations:
                    sql_identifier: trc_hist_corrective_event_ids

            corrective_event_ids_value:
                range: string
                description: Value holder for corrective event IDs

    ActorTracking:
        description: Supply chain participants and their interactions with entities (products, materials, batches, commodities)
        attributes:
            actor_identifier:
                range: string
                description: Organization identifier GLN LEI or VAT
                annotations:
                    sql_identifier: trc_actor_id
                    owl.filler: gs1:PartyGlobalLocationNumber
                    references: "Berger et al.; ESPR"
                pattern: "^([0-9]{13}|[A-Z0-9]{20}|[A-Z]{2}[A-Z0-9]+)$"

            actor_identifier_value:
                range: string
                description: Value holder for actor identifier

            actor_role:
                range: string
                description: Role in supply chain using CBV Source/Destination types
                annotations:
                    sql_identifier: trc_actor_role
                    owl.filler: cbv:SourceDestinationType
                    references: "Berger et al."

            actor_role_value:
                range: string
                description: Value holder for actor role

            activity_timestamp:
                range: datetime
                description: When actor interacted with entity (product, material, batch, commodity)
                annotations:
                    sql_identifier: trc_actor_timestamp
                    references: "CIRPASS"

            activity_timestamp_value:
                range: string
                description: Value holder for activity timestamp

            action_performed:
                range: string
                description: Specific action taken by actor
                annotations:
                    sql_identifier: trc_actor_action

            action_performed_value:
                range: string
                description: Value holder for action performed

            responsibility_scope:
                range: string
                description: Actor responsibility boundaries
                annotations:
                    sql_identifier: trc_actor_responsibility

            responsibility_scope_value:
                range: string
                description: Value holder for responsibility scope

            certification_status:
                range: uri
                multivalued: true
                description: URI references to actor certifications ISO 9001 ISO 14001 organic fair trade
                annotations:
                    sql_identifier: trc_actor_certifications
                    reference_type: "certification"
                    references: "King et al."

            certification_status_value:
                range: string
                description: Value holder for certification status

    LogisticsEvents:
        description: Supply chain transportation tracking post-import - aligns with EPCIS ObjectEvent concepts
        attributes:
            shipment_identifier:
                range: string
                description: Unique shipment reference carrier tracking number
                annotations:
                    sql_identifier: trc_logis_shipment_id

            shipment_identifier_value:
                range: string
                description: Value holder for shipment identifier

            transport_mode:
                range: string
                description: Mode of transport using UN/ECE Recommendation 19 codes
                annotations:
                    sql_identifier: trc_logis_transport_mode
                    owl.filler: unece:TransportModeCode

            transport_mode_value:
                range: string
                description: Value holder for transport mode

            departure_location:
                range: string
                description: Origin UN/LOCODE or GLN
                annotations:
                    sql_identifier: trc_logis_departure_loc
                    owl.filler: unece:UNLOCODE
                    references: "CIRPASS"
                pattern: "^([A-Z]{2}[A-Z0-9]{3}|[0-9]{13})$"

            departure_location_value:
                range: string
                description: Value holder for departure location

            departure_timestamp:
                range: datetime
                description: Departure time with timezone
                annotations:
                    sql_identifier: trc_logis_departure_time

            departure_timestamp_value:
                range: string
                description: Value holder for departure timestamp

            arrival_location:
                range: string
                description: Destination UN/LOCODE or GLN
                annotations:
                    sql_identifier: trc_logis_arrival_loc
                    owl.filler: unece:UNLOCODE
                pattern: "^([A-Z]{2}[A-Z0-9]{3}|[0-9]{13})$"

            arrival_location_value:
                range: string
                description: Value holder for arrival location

            arrival_timestamp:
                range: datetime
                description: Actual or estimated arrival
                annotations:
                    sql_identifier: trc_logis_arrival_time

            arrival_timestamp_value:
                range: string
                description: Value holder for arrival timestamp

            carrier_identifier:
                range: string
                description: Transport company GLN or identifier
                annotations:
                    sql_identifier: trc_logis_carrier_id
                    owl.filler: gs1:PartyGlobalLocationNumber

            carrier_identifier_value:
                range: string
                description: Value holder for carrier identifier

            route_information:
                range: string
                description: Planned route using GS1 route information structure
                annotations:
                    sql_identifier: trc_logis_route_info
                    owl.filler: gs1:RouteInformation

            route_information_value:
                range: string
                description: Value holder for route information

            intermediate_stops:
                range: IntermediateStop
                multivalued: true
                description: Distribution centers warehouses transshipment points

            transport_conditions:
                range: string
                description: Transport conditions using EPCIS 2.0 SensorReport for temperature humidity shock
                annotations:
                    sql_identifier: trc_logis_conditions
                    owl.filler: epcis:SensorReport

            transport_conditions_value:
                range: string
                description: Value holder for transport conditions

    IntermediateStop:
        description: Stop location during logistics movement
        attributes:
            stop_location:
                range: string
                description: UN/LOCODE or GLN of stop location
                annotations:
                    sql_identifier: trc_logis_stop_location
                    owl.filler: unece:UNLOCODE
                pattern: "^([A-Z]{2}[A-Z0-9]{3}|[0-9]{13})$"

            stop_location_value:
                range: string
                description: Value holder for stop location

            stop_timestamp:
                range: datetime
                description: When arrived at stop
                annotations:
                    sql_identifier: trc_logis_stop_time

            stop_timestamp_value:
                range: string
                description: Value holder for stop timestamp

            stop_duration:
                range: string
                description: Stop duration in ISO 8601 format (e.g. PT2H30M for 2 hours 30 minutes)
                annotations:
                    sql_identifier: trc_logis_stop_duration
                    iso_8601_duration: true
                pattern: "^P(?:\\d+Y)?(?:\\d+M)?(?:\\d+W)?(?:\\d+D)?(?:T(?:\\d+H)?(?:\\d+M)?(?:\\d+(?:\\.\\d+)?S)?)?$"

            stop_duration_value:
                range: string
                description: Value holder for stop duration

    ReverseLogistics:
        description: End-of-life and return pathway management beyond EPCIS scope
        attributes:
            return_event_identifier:
                range: string
                description: Unique return tracking ID
                annotations:
                    sql_identifier: trc_reverse_event_id

            return_event_identifier_value:
                range: string
                description: Value holder for return event identifier

            return_initiation_date:
                range: datetime
                description: When return process started
                annotations:
                    sql_identifier: trc_reverse_init_date

            return_initiation_date_value:
                range: string
                description: Value holder for return initiation date

            return_reason:
                range: ReturnReasonEnum
                description: Reason for return
                annotations:
                    sql_identifier: trc_reverse_reason

            return_reason_value:
                range: string
                description: Value holder for return reason

            customer_return_channels:
                range: CustomerReturnChannel
                multivalued: true
                description: Available return methods and locations

            refurbishment_event:
                range: RefurbishmentEvent
                description: Repair and refurbishment activities

            recycling_event:
                range: RecyclingEvent
                description: Material and product recovery and recycling processes

            disposal_event:
                range: DisposalEvent
                description: Final disposal method and certification

    CustomerReturnChannel:
        description: Return channel information
        attributes:
            return_location:
                range: string
                description: Location where entities (products, materials, batches, commodities) can be returned - GLN identifier
                annotations:
                    sql_identifier: trc_reverse_return_location
                    owl.filler: gs1:GlobalLocationNumber

            return_location_value:
                range: string
                description: Value holder for return location

            return_method:
                range: ReturnMethodEnum
                description: How entity (product, material, batch, commodity) can be returned
                annotations:
                    sql_identifier: trc_reverse_method

            return_method_value:
                range: string
                description: Value holder for return method

            return_documentation:
                range: uri
                multivalued: true
                description: URI references to return authorization shipping labels RMA documents
                annotations:
                    sql_identifier: trc_reverse_return_docs
                    reference_type: "documentation"

            return_documentation_value:
                range: string
                description: Value holder for return documentation

    RefurbishmentEvent:
        description: Entity (product, material, component) repair and refurbishment details
        attributes:
            refurbishment_date:
                range: datetime
                description: When refurbishment occurred ISO 8601 format
                annotations:
                    sql_identifier: trc_reverse_refurb_date
                    iso_8601: true
                    references: "King et al.; CE-RISE Deliverable 1.1"

            refurbishment_date_value:
                range: string
                description: Value holder for refurbishment date

            refurbishment_activities:
                range: string
                multivalued: true
                description: List of refurbishment activities performed
                annotations:
                    sql_identifier: trc_reverse_refurb_activities
                    references: "King et al.; CE-RISE Deliverable 1.1"

            refurbishment_activities_value:
                range: string
                description: Value holder for refurbishment activities

            components_replaced:
                range: string
                multivalued: true
                description: Components that were replaced
                annotations:
                    sql_identifier: trc_reverse_components

            components_replaced_value:
                range: string
                description: Value holder for components replaced

            refurbishment_certification:
                range: uri
                description: URI reference to refurbishment quality certification or standard
                annotations:
                    sql_identifier: trc_reverse_refurb_cert
                    reference_type: "certification"
                    references: "King et al."

            refurbishment_certification_value:
                range: string
                description: Value holder for refurbishment certification

    RecyclingEvent:
        description: Material and product recovery and recycling details
        attributes:
            recycling_date:
                range: datetime
                description: When recycling occurred
                annotations:
                    sql_identifier: trc_reverse_recycle_date
                    references: "ESPR; Battery Pass; CIRPASS; King et al.; CE-RISE Deliverable 1.1"

            recycling_date_value:
                range: string
                description: Value holder for recycling date

            recycling_stream:
                range: RecyclingStreamEnum
                description: Which recycling stream
                annotations:
                    sql_identifier: trc_reverse_stream

            recycling_stream_value:
                range: string
                description: Value holder for recycling stream

            materials_recovered:
                range: string
                multivalued: true
                description: List of recovered materials
                annotations:
                    sql_identifier: trc_reverse_materials

            materials_recovered_value:
                range: string
                description: Value holder for materials recovered

            recovery_percentage:
                range: float
                description: Percentage of materials recovered (0-100)
                annotations:
                    sql_identifier: trc_reverse_recovery_pct
                    unit: "percent"
                minimum_value: 0.0
                maximum_value: 100.0

            recovery_percentage_value:
                range: string
                description: Value holder for recovery percentage

    DisposalEvent:
        description: Final disposal details
        attributes:
            disposal_date:
                range: datetime
                description: When disposal occurred
                annotations:
                    sql_identifier: trc_reverse_disposal_date
                    references: "ESPR; CE-RISE Deliverable 1.1"

            disposal_date_value:
                range: string
                description: Value holder for disposal date

            disposal_method:
                range: DisposalMethodEnum
                description: Method of disposal
                annotations:
                    sql_identifier: trc_reverse_disposal_method
                    references: "ESPR; CE-RISE Deliverable 1.1"

            disposal_method_value:
                range: string
                description: Value holder for disposal method

            disposal_facility:
                range: string
                description: GLN or identifier of disposal facility
                annotations:
                    sql_identifier: trc_reverse_disposal_facility
                    owl.filler: gs1:GlobalLocationNumber
                    references: "Koppelaar et al."

            disposal_facility_value:
                range: string
                description: Value holder for disposal facility

            disposal_certification:
                range: uri
                description: URI reference to disposal certification or compliance document
                annotations:
                    sql_identifier: trc_reverse_disposal_cert
                    reference_type: "certification"
                    references: "King et al."

            disposal_certification_value:
                range: string
                description: Value holder for disposal certification

    AggregationEvents:
        description: Packaging hierarchy operations extending EPCIS AggregationEvent
        attributes:
            aggregation_event_id:
                range: string
                description: Unique identifier for aggregation operation - aligns with EPCIS eventID
                annotations:
                    sql_identifier: trc_agg_event_id
                pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"

            aggregation_event_id_value:
                range: string
                description: Value holder for aggregation event ID

            aggregation_type:
                range: string
                description: ADD for packing DELETE for unpacking - uses EPCIS Action directly
                annotations:
                    sql_identifier: trc_agg_type
                    owl.filler: epcis:Action

            aggregation_type_value:
                range: string
                description: Value holder for aggregation type

            parent_identifier:
                range: string
                description: Container pallet or case EPC being packed/unpacked - aligns with EPCIS parentID
                annotations:
                    sql_identifier: trc_agg_parent_id
                pattern: "^(urn:epc:id:|[0-9]{14}:).*"

            parent_identifier_value:
                range: string
                description: Value holder for parent identifier

            child_identifiers:
                range: string
                multivalued: true
                description: Child EPCs being aggregated/disaggregated using EPCIS childEPCs structure
                annotations:
                    sql_identifier: trc_agg_child_ids
                    owl.filler: epcis:EPCList

            child_identifiers_value:
                range: string
                description: Value holder for child identifiers

            aggregation_location:
                range: string
                description: GLN where operation occurred - aligns with EPCIS bizLocation
                annotations:
                    sql_identifier: trc_agg_location
                    owl.filler: gs1:GlobalLocationNumber
                pattern: "^[0-9]{13}$"

            aggregation_location_value:
                range: string
                description: Value holder for aggregation location

            aggregation_timestamp:
                range: datetime
                description: When packing/unpacking happened - aligns with EPCIS eventTime
                annotations:
                    sql_identifier: trc_agg_timestamp

            aggregation_timestamp_value:
                range: string
                description: Value holder for aggregation timestamp

            packaging_level:
                range: PackagingLevelEnum
                description: Level in packaging hierarchy
                annotations:
                    sql_identifier: trc_agg_pack_level

            packaging_level_value:
                range: string
                description: Value holder for packaging level

            biz_step:
                range: string
                description: Business step like packing commissioning etc - uses CBV directly
                annotations:
                    sql_identifier: trc_agg_biz_step
                    owl.filler: cbv:BizStep

            biz_step_value:
                range: string
                description: Value holder for business step

            disposition:
                range: string
                description: Business condition of aggregation - aligns with EPCIS disposition
                annotations:
                    sql_identifier: trc_agg_disposition

            disposition_value:
                range: string
                description: Value holder for disposition

            read_point:
                range: string
                description: Specific read point where aggregation occurred - EPCIS readPoint
                annotations:
                    sql_identifier: trc_agg_read_point
                    owl.filler: gs1:GlobalLocationNumber

            read_point_value:
                range: string
                description: Value holder for read point

    SupplyChainIncidents:
        description: Exception events and disruptions during supply chain operations
        attributes:
            incident_identifier:
                range: string
                description: Unique incident tracking ID
                annotations:
                    sql_identifier: trc_incident_id
                pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"

            incident_identifier_value:
                range: string
                description: Value holder for incident identifier

            incident_type:
                range: IncidentTypeEnum
                description: Classification of incident type
                annotations:
                    sql_identifier: trc_incident_type

            incident_type_value:
                range: string
                description: Value holder for incident type

            incident_timestamp:
                range: datetime
                description: When incident occurred
                annotations:
                    sql_identifier: trc_incident_timestamp

            incident_timestamp_value:
                range: string
                description: Value holder for incident timestamp

            incident_location:
                range: string
                description: GLN or UN/LOCODE where incident happened
                annotations:
                    sql_identifier: trc_incident_location
                    owl.filler: unece:UNLOCODE
                pattern: "^([0-9]{13}|[A-Z]{2}[A-Z0-9]{3}).*"

            incident_location_value:
                range: string
                description: Value holder for incident location

            affected_entities:
                range: string
                multivalued: true
                description: EPCs, GTINs, batch numbers, or lot identifiers of affected entities (products, materials, batches, commodities)
                annotations:
                    sql_identifier: trc_incident_affected_entities
                    owl.filler: epcis:EPCList

            affected_entities_value:
                range: string
                description: Value holder for affected entities

            incident_severity:
                range: SeverityLevelEnum
                description: Severity level classification
                annotations:
                    sql_identifier: trc_incident_severity

            incident_severity_value:
                range: string
                description: Value holder for incident severity

            root_cause:
                range: string
                description: Identified cause of the incident
                annotations:
                    sql_identifier: trc_incident_root_cause

            root_cause_value:
                range: string
                description: Value holder for root cause

            corrective_actions:
                range: string
                multivalued: true
                description: Actions taken to resolve or mitigate
                annotations:
                    sql_identifier: trc_incident_corrective_actions

            corrective_actions_value:
                range: string
                description: Value holder for corrective actions

            incident_documentation:
                range: uri
                multivalued: true
                description: URI references to incident reports insurance claims photos
                annotations:
                    sql_identifier: trc_incident_documentation
                    reference_type: "documentation"

            incident_documentation_value:
                range: string
                description: Value holder for incident documentation

            resolution_status:
                range: ResolutionStatusEnum
                description: Current status of incident resolution
                annotations:
                    sql_identifier: trc_incident_resolution_status

            resolution_status_value:
                range: string
                description: Value holder for resolution status

            linked_event_ids:
                range: string
                multivalued: true
                description: IDs of related supply chain events
                annotations:
                    sql_identifier: trc_incident_linked_events
                pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"

            linked_event_ids_value:
                range: string
                description: Value holder for linked event IDs

            estimated_impact:
                range: string
                description: Estimated financial impact using ISO monetary amount structure
                annotations:
                    sql_identifier: trc_incident_impact
                    owl.filler: iso:MonetaryAmount

            estimated_impact_value:
                range: string
                description: Value holder for estimated impact

            reporter_identifier:
                range: string
                description: GLN or identifier of entity reporting the incident
                annotations:
                    sql_identifier: trc_incident_reporter
                    owl.filler: gs1:PartyGlobalLocationNumber
                pattern: "^[0-9]{13}$"

            reporter_identifier_value:
                range: string
                description: Value holder for reporter identifier

# Enumerations aligned with EPCIS/CBV standards
enums:
    OwnershipStatusEnum:
        description: Legal status of ownership - DPP extension beyond EPCIS standard
        permissible_values:
            FULL_OWNERSHIP:
                description: Complete legal ownership
            CONDITIONAL:
                description: Conditional ownership pending payment
            CONSIGNED:
                description: Owned but consigned to another party
            LEASED:
                description: Under lease agreement
            IN_TRANSIT:
                description: Ownership during transportation
            DISPUTED:
                description: Ownership under dispute

    ReturnReasonEnum:
        description: Reasons for product return - DPP specific
        permissible_values:
            DEFECT:
                description: Product defect or malfunction
            WARRANTY_CLAIM:
                description: Warranty claim
            END_OF_LIFE:
                description: Product reached end of life
            PRODUCT_RECALL:
                description: Manufacturer recall
            CUSTOMER_DISSATISFACTION:
                description: Customer not satisfied

    ReturnMethodEnum:
        description: How product was returned - DPP specific
        permissible_values:
            STORE_RETURN:
                description: Returned to retail store
            MAIL_RETURN:
                description: Mailed back
            PICKUP_SERVICE:
                description: Pickup service collected
            DROP_OFF_POINT:
                description: Dropped at collection point

    RecyclingStreamEnum:
        description: Recycling pathways - DPP specific
        permissible_values:
            ELECTRONICS:
                description: E-waste recycling
            PLASTICS:
                description: Plastic recycling
            METALS:
                description: Metal recycling
            TEXTILES:
                description: Textile recycling
            BATTERIES:
                description: Battery recycling
            MIXED_MATERIALS:
                description: Mixed material recycling

    DisposalMethodEnum:
        description: Final disposal methods - DPP specific
        permissible_values:
            LANDFILL:
                description: Landfill disposal
            INCINERATION:
                description: Incineration
            ENERGY_RECOVERY:
                description: Waste-to-energy
            COMPOSTING:
                description: Industrial composting
            SPECIALIZED_TREATMENT:
                description: Specialized hazardous treatment

    PackagingLevelEnum:
        description: Levels in packaging hierarchy - aligns with EPCIS packaging concepts
        permissible_values:
            ITEM:
                description: Individual item or unit level
            INNER_PACK:
                description: Inner pack or bundle
            CASE:
                description: Case or carton level
            PALLET:
                description: Pallet level
            CONTAINER:
                description: Container or trailer level
            TRANSPORT_UNIT:
                description: Full transport unit

    IncidentTypeEnum:
        description: Types of supply chain incidents and exceptions
        permissible_values:
            DAMAGE:
                description: Physical damage to products
            THEFT:
                description: Theft or loss of products
            DELAY:
                description: Transportation or processing delay
            CONTAMINATION:
                description: Product contamination
            COLD_CHAIN_BREAK:
                description: Temperature excursion in cold chain
            SECURITY_BREACH:
                description: Unauthorized access or tampering
            NATURAL_DISASTER:
                description: Impact from natural disaster
            RECALL:
                description: Product recall activation
            QUARANTINE:
                description: Products placed in quarantine
            DOCUMENTATION_ERROR:
                description: Documentation or labeling error
            SYSTEM_FAILURE:
                description: IT or equipment system failure
            REGULATORY_HOLD:
                description: Regulatory inspection or hold

    SeverityLevelEnum:
        description: Severity classification for incidents
        permissible_values:
            CRITICAL:
                description: Critical severity requiring immediate action
            HIGH:
                description: High severity with significant impact
            MEDIUM:
                description: Medium severity with moderate impact
            LOW:
                description: Low severity with minimal impact
            INFORMATIONAL:
                description: Informational only no immediate action required

    ResolutionStatusEnum:
        description: Status of incident resolution
        permissible_values:
            OPEN:
                description: Incident is open and unresolved
            IN_PROGRESS:
                description: Resolution in progress
            PENDING_VERIFICATION:
                description: Resolution pending verification
            RESOLVED:
                description: Incident resolved
            CLOSED:
                description: Incident closed
            ESCALATED:
                description: Escalated to higher authority
