public function serializeAttribute($name)
    {
        if ($name === 'createdOn') {
            $val = $this->getCreatedOn();
            if ($val instanceof \DateTimeInterface) {
                $val = $val->format("Y-m-d H:i:s");
            }
            return (string)$val;
        }
        return parent::serializeAttribute($name);
    }