1: <?php
2:
3: namespace Alchemy\tests;
4: use Alchemy\orm\DataMapper;
5:
6:
7: class Language extends DataMapper {
8: protected static $table_name = "Language";
9: protected static $schema_args = array(
10: 'columns' => array(
11: 'LanguageID' => 'Integer(primary_key = true, auto_increment = true)',
12: 'ISO2Code' => 'String(2, unique = true)',
13: 'ParentLanguageID' => 'Foreign(self.LanguageID, null = true)',
14: 'SpokenLanguageID' => 'Foreign(self.LanguageID, null = true)',
15: 'LatestChangeStamp' => 'Timestamp',
16: ),
17: 'relationships' => array(
18: 'Files' => 'OneToMany(Alchemy\\tests\\UploadedFile, backref = "Language")',
19: 'Parent' => 'ManyToOne(Alchemy\\tests\\Language, backref = "Children", key = self.ParentLanguageID)',
20: 'SpokenLanguage' => 'OneToOne(Alchemy\\tests\\Language, backref = "WrittenLanguage", key = self.SpokenLanguageID)'
21: ));
22: }
23: