. */ namespace Volkszaehler\Model; use Volkszaehler\Model; /** * Property entity * * @author Steffen Vogel * @package default * * @Entity * @Table(name="properties") */ class Property { /** * @Id * @Column(type="smallint", nullable=false) * @GeneratedValue(strategy="AUTO") * * @todo wait until DDC-117 is fixed (PKs on FKs) */ protected $id; /** @Column(type="string", nullable=false) */ protected $name; /** @Column(type="string", nullable=false) */ protected $value; /** @ManyToOne(targetEntity="Entity", inversedBy="properties") */ protected $entity; /** * Constructor * * @param string $key * @param string $value */ public function __construct($name, $value) { $this->name = (string) $name; $this->value = (string) $value; } } ?>