Changeset View
Changeset View
Standalone View
Standalone View
src/applications/legalpad/storage/LegalpadDocumentSignature.php
Show All 20 Lines | final class LegalpadDocumentSignature | ||||
private $document = self::ATTACHABLE; | private $document = self::ATTACHABLE; | ||||
public function getConfiguration() { | public function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_SERIALIZATION => array( | self::CONFIG_SERIALIZATION => array( | ||||
'signatureData' => self::SERIALIZATION_JSON, | 'signatureData' => self::SERIALIZATION_JSON, | ||||
), | ), | ||||
self::CONFIG_COLUMN_SCHEMA => array( | |||||
'documentVersion' => 'uint32', | |||||
'signatureType' => 'text4', | |||||
'signerPHID' => 'phid?', | |||||
'signerName' => 'text255', | |||||
'signerEmail' => 'text255', | |||||
'secretKey' => 'bytes20', | |||||
'verified' => 'bool?', | |||||
'isExemption' => 'bool', | |||||
'exemptionPHID' => 'phid?', | |||||
), | |||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function save() { | public function save() { | ||||
if (!$this->getSecretKey()) { | if (!$this->getSecretKey()) { | ||||
$this->setSecretKey(Filesystem::readRandomCharacters(20)); | $this->setSecretKey(Filesystem::readRandomCharacters(20)); | ||||
} | } | ||||
return parent::save(); | return parent::save(); | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |