diff --git a/_config.php b/_config.php index e69de29..cdd601c 100644 --- a/_config.php +++ b/_config.php @@ -0,0 +1,7 @@ + 'TestModelAdmin', +)); +LeftAndMain::add_menu_item('test', 'Test ModelAdmin', 'admin/test', 'TestModelAdmin'); diff --git a/code/control/TestModelAdmin.php b/code/control/TestModelAdmin.php new file mode 100644 index 0000000..1e4b067 --- /dev/null +++ b/code/control/TestModelAdmin.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/code/model/Client.php b/code/model/Client.php new file mode 100644 index 0000000..5088558 --- /dev/null +++ b/code/model/Client.php @@ -0,0 +1,15 @@ + "Varchar", + ); + static $many_many = array( + "Contacts" => "Contact", + ); + static $belongs_many_many = array( + "Projects" => "Project", + ); +} + +?> \ No newline at end of file diff --git a/code/model/Contact.php b/code/model/Contact.php new file mode 100644 index 0000000..a9a01d5 --- /dev/null +++ b/code/model/Contact.php @@ -0,0 +1,14 @@ + "Varchar", + "Surname" => "Varchar", + "Email" => "Varchar", + ); + static $belongs_many_many = array( + "Clients" => "Client", + ); +} + +?> \ No newline at end of file diff --git a/code/model/Developer.php b/code/model/Developer.php new file mode 100644 index 0000000..905242e --- /dev/null +++ b/code/model/Developer.php @@ -0,0 +1,15 @@ + "Varchar", + "Surname" => "Varchar", + "Email" => "Varchar", + "Username" => "Varchar", + ); + static $belongs_many_many = array( + "Projects" => "Project", + ); +} + +?> \ No newline at end of file diff --git a/code/model/Project.php b/code/model/Project.php new file mode 100644 index 0000000..f8a36fe --- /dev/null +++ b/code/model/Project.php @@ -0,0 +1,13 @@ + "Varchar", + ); + static $many_many = array( + "Clients" => "Client", + "Developers" => "Developer", + ); +} + +?> \ No newline at end of file