record = $record; $this->created = $created; } /** * Canonical post-save record. */ public function record(): ProductRecord { return $this->record; } /** * Whether the save inserted a fresh row. */ public function created(): bool { return $this->created; } /** * Deep equality against another result. * * Records are compared via {@see ProductRecord::toArray()} so * two records carrying the same column payload compare equal * even when they are distinct object instances. * * @param self $other Result to compare. */ public function equals( self $other ): bool { if ( $this->created !== $other->created ) { return false; } return $this->record->toArray() === $other->record->toArray(); } }