{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://puranwater.com/schemas/postgres/engineering_mcp/plc_program_unit.schema.json","title":"plc_program_unit","type":"object","properties":{"program_uid":{"type":"string","format":"uuid","x-pg-type":"uuid"},"project_ref":{"type":"string","x-pg-type":"text"},"pou_name":{"type":"string","x-pg-type":"text"},"pou_type":{"type":"string","x-pg-type":"text"},"iec_language":{"type":"string","x-pg-type":"text"},"segment_uid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"equipment_uid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"x-pg-type":"uuid"},"resource_name":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"configuration_name":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"source_path":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"source_hash":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"compiled_artifact_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"program_summary":{"x-pg-type":"jsonb"},"version":{"type":"string","x-pg-type":"text"},"published_at":{"type":"string","format":"date-time","x-pg-type":"timestamptz"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"x-pg-type":"text"},"created_at":{"type":"string","format":"date-time","x-pg-type":"timestamptz"},"updated_at":{"type":"string","format":"date-time","x-pg-type":"timestamptz"}},"x-table-schema":"public","required":["project_ref","pou_name","pou_type","iec_language"],"x-primary-key":["program_uid"],"x-foreign-keys":[{"column":"project_ref","references_table":"project","references_column":"ref","constraint":"plc_program_unit_project_ref_fkey"},{"column":"segment_uid","references_table":"process_segment_definition","references_column":"segment_uid","constraint":"plc_program_unit_segment_uid_fkey"}]}