summaryrefslogtreecommitdiffstats
path: root/lib/model/map/DomainPermissionMapBuilder.php
blob: 380be1cfdb41a3a431277062eede53daec73738c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php



class DomainPermissionMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.DomainPermissionMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('domain_permission');
		$tMap->setPhpName('DomainPermission');

		$tMap->setUseIdGenerator(true);

		$tMap->addForeignKey('USER_ID', 'UserId', 'int', CreoleTypes::INTEGER, 'user', 'ID', false, null);

		$tMap->addForeignKey('DOMAIN_ID', 'DomainId', 'int', CreoleTypes::INTEGER, 'domain', 'ID', false, null);

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

	} 
}