Created
January 18, 2013 09:14
-
-
Save RafaelKa/4563350 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Flows\IdentityValidation\Domain\Model; | |
/* * | |
* This script belongs to the TYPO3 Flow package "Flows.IdentityValidation".* | |
* * | |
* */ | |
use TYPO3\Flow\Annotations as Flow; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* A Model with multiple id | |
* | |
* @Flow\Entity | |
*/ | |
class ModelWithMultipleId { | |
/** | |
* The first id | |
* @var integer | |
* @ORM\Id | |
*/ | |
protected $firstId; | |
/** | |
* The second id | |
* @var integer | |
* @ORM\Id | |
*/ | |
protected $secondId; | |
/** | |
* The third id | |
* @var integer | |
* @ORM\Id | |
*/ | |
protected $thirdId; | |
/** | |
* The var one | |
* @var string | |
* @Flow\Identity | |
* @Flow\Validate(type="NotEmpty") | |
*/ | |
protected $varOne; | |
/** | |
* The var two | |
* @var string | |
* @Flow\Identity | |
* @Flow\Validate(type="NotEmpty") | |
*/ | |
protected $varTwo; | |
/** | |
* The var three | |
* @var string | |
* @Flow\Identity | |
* @Flow\Validate(type="NotEmpty") | |
*/ | |
protected $varThree; | |
/** | |
* Get the Model with multiple id's first id | |
* | |
* @return integer The Model with multiple id's first id | |
*/ | |
public function getFirstId() { | |
return $this->firstId; | |
} | |
/** | |
* Sets this Model with multiple id's first id | |
* | |
* @param integer $firstId The Model with multiple id's first id | |
* @return void | |
*/ | |
public function setFirstId($firstId) { | |
$this->firstId = $firstId; | |
} | |
/** | |
* Get the Model with multiple id's second id | |
* | |
* @return integer The Model with multiple id's second id | |
*/ | |
public function getSecondId() { | |
return $this->secondId; | |
} | |
/** | |
* Sets this Model with multiple id's second id | |
* | |
* @param integer $secondId The Model with multiple id's second id | |
* @return void | |
*/ | |
public function setSecondId($secondId) { | |
$this->secondId = $secondId; | |
} | |
/** | |
* Get the Model with multiple id's third id | |
* | |
* @return integer The Model with multiple id's third id | |
*/ | |
public function getThirdId() { | |
return $this->thirdId; | |
} | |
/** | |
* Sets this Model with multiple id's third id | |
* | |
* @param integer $thirdId The Model with multiple id's third id | |
* @return void | |
*/ | |
public function setThirdId($thirdId) { | |
$this->thirdId = $thirdId; | |
} | |
/** | |
* Get the Model with multiple id's var one | |
* | |
* @return string The Model with multiple id's var one | |
*/ | |
public function getVarOne() { | |
return $this->varOne; | |
} | |
/** | |
* Sets this Model with multiple id's var one | |
* | |
* @param string $varOne The Model with multiple id's var one | |
* @return void | |
*/ | |
public function setVarOne($varOne) { | |
$this->varOne = $varOne; | |
} | |
/** | |
* Get the Model with multiple id's var two | |
* | |
* @return string The Model with multiple id's var two | |
*/ | |
public function getVarTwo() { | |
return $this->varTwo; | |
} | |
/** | |
* Sets this Model with multiple id's var two | |
* | |
* @param string $varTwo The Model with multiple id's var two | |
* @return void | |
*/ | |
public function setVarTwo($varTwo) { | |
$this->varTwo = $varTwo; | |
} | |
/** | |
* Get the Model with multiple id's var three | |
* | |
* @return string The Model with multiple id's var three | |
*/ | |
public function getVarThree() { | |
return $this->varThree; | |
} | |
/** | |
* Sets this Model with multiple id's var three | |
* | |
* @param string $varThree The Model with multiple id's var three | |
* @return void | |
*/ | |
public function setVarThree($varThree) { | |
$this->varThree = $varThree; | |
} | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS `flows_identityvalidation_domain_model_modelwithmultipleid` ( | |
`firstid` int(11) NOT NULL, | |
`secondid` int(11) NOT NULL, | |
`thirdid` int(11) NOT NULL, | |
`varone` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | |
`vartwo` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | |
`varthree` varchar(255) COLLATE utf8_unicode_ci NOT NULL, | |
PRIMARY KEY (`firstid`,`secondid`,`thirdid`), | |
UNIQUE KEY `flow_identity_flows_identityvalidation_domain_model_model_0ce54` (`varone`,`vartwo`,`varthree`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment