mirror of
https://github.com/brmlab/brmsklad.git
synced 2025-08-01 22:13:34 +02:00
Simple Books, Languages and connection to Users
This commit is contained in:
parent
a3ce16c886
commit
012f8b7e7a
5 changed files with 30 additions and 1 deletions
7
app/Controller/BooksController.php
Normal file
7
app/Controller/BooksController.php
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
class BooksController extends AppController {
|
||||
|
||||
var $scaffold;
|
||||
|
||||
}
|
7
app/Controller/LanguagesController.php
Normal file
7
app/Controller/LanguagesController.php
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
class LanguagesController extends AppController {
|
||||
|
||||
var $scaffold;
|
||||
|
||||
}
|
7
app/Model/Book.php
Normal file
7
app/Model/Book.php
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
class Book extends AppModel {
|
||||
|
||||
var $belongsTo = array("Language","User");
|
||||
|
||||
}
|
8
app/Model/Language.php
Normal file
8
app/Model/Language.php
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
class Language extends AppModel {
|
||||
|
||||
var $displayField = "language";
|
||||
var $hasMany = array('Book');
|
||||
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class User extends AppModel {
|
||||
|
||||
var $hasMany = array('Item');
|
||||
var $hasMany = array('Item','Book');
|
||||
var $order = "User.name ASC";
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue