Initial entry.
This commit is contained in:
parent
4f996de800
commit
d2f41b751b
19
sandbox/models/Contact.class.php
Normal file
19
sandbox/models/Contact.class.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
require_once('generated/BaseContact.class.php');
|
||||||
|
/**
|
||||||
|
* This class has been auto-generated by the Doctrine ORM Framework
|
||||||
|
*/
|
||||||
|
class Contact extends BaseContact
|
||||||
|
{
|
||||||
|
|
||||||
|
public function setTableDefinition()
|
||||||
|
{
|
||||||
|
parent::setTableDefinition();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setUp()
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
10
sandbox/models/User.class.php
Normal file
10
sandbox/models/User.class.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
require_once('generated/BaseUser.class.php');
|
||||||
|
/**
|
||||||
|
* This class has been auto-generated by the Doctrine ORM Framework
|
||||||
|
*/
|
||||||
|
class User extends BaseUser
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
21
sandbox/models/generated/BaseContact.class.php
Normal file
21
sandbox/models/generated/BaseContact.class.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class has been auto-generated by the Doctrine ORM Framework
|
||||||
|
*/
|
||||||
|
abstract class BaseContact extends Doctrine_Record
|
||||||
|
{
|
||||||
|
|
||||||
|
public function setTableDefinition()
|
||||||
|
{
|
||||||
|
$this->setTableName('contact');
|
||||||
|
$this->hasColumn('name', 'string', 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setUp()
|
||||||
|
{
|
||||||
|
$this->hasMany('User', array('local' => 'id',
|
||||||
|
'foreign' => 'contact_id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
22
sandbox/models/generated/BaseUser.class.php
Normal file
22
sandbox/models/generated/BaseUser.class.php
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class has been auto-generated by the Doctrine ORM Framework
|
||||||
|
*/
|
||||||
|
abstract class BaseUser extends Doctrine_Record
|
||||||
|
{
|
||||||
|
|
||||||
|
public function setTableDefinition()
|
||||||
|
{
|
||||||
|
$this->setTableName('user');
|
||||||
|
$this->hasColumn('username', 'string', 255);
|
||||||
|
$this->hasColumn('contact_id', 'integer', null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setUp()
|
||||||
|
{
|
||||||
|
$this->hasOne('Contact', array('local' => 'contact_id',
|
||||||
|
'foreign' => 'id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
BIN
sandbox/sandbox.db
Executable file
BIN
sandbox/sandbox.db
Executable file
Binary file not shown.
6
sandbox/schema/contact.yml
Normal file
6
sandbox/schema/contact.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
Contact:
|
||||||
|
columns:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
length: 255
|
13
sandbox/schema/user.yml
Normal file
13
sandbox/schema/user.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
User:
|
||||||
|
columns:
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
length: 255
|
||||||
|
contact_id:
|
||||||
|
type: integer
|
||||||
|
size: 11
|
||||||
|
relations:
|
||||||
|
Contact:
|
||||||
|
local: contact_id
|
||||||
|
foreign: id
|
Loading…
x
Reference in New Issue
Block a user