Initial commit

This commit is contained in:
2018-04-02 08:23:14 +02:00
commit 9b83d1dc09
151 changed files with 20566 additions and 0 deletions

0
src/Model/Behavior/empty Normal file
View File

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* Budget Entity
*
* @property int $id
* @property int $wl_schooltype_id
* @property string $snr
* @property int $wl_budget_id
* @property int $count
* @property string $comment
* @property string $year
* @property \Cake\I18n\FrozenTime $created
* @property \Cake\I18n\FrozenTime $modified
*
* @property \App\Model\Entity\WlSchooltype $wl_schooltype
* @property \App\Model\Entity\WlBudget $wl_budget
*/
class Budget extends Entity
{
/**
* Fields that can be mass assigned using newEntity() or patchEntity().
*
* Note that when '*' is set to true, this allows all unspecified fields to
* be mass assigned. For security purposes, it is advised to set '*' to false
* (or remove it), and explicitly make individual fields accessible as needed.
*
* @var array
*/
protected $_accessible = [
'wl_schooltype_id' => true,
'snr' => true,
'wl_budget_id' => true,
'count' => true,
'comment' => true,
'year' => true,
'created' => true,
'modified' => true,
'wl_schooltype' => true,
'wl_budget' => true
];
}

View File

@@ -0,0 +1,34 @@
<?php
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* School Entity
*
* @property int $id
* @property string $dst_schluessel
* @property string $dst_name
* @property string $dst_schulart
*
* @property \App\Model\Entity\Budget[] $budget
*/
class School extends Entity
{
/**
* Fields that can be mass assigned using newEntity() or patchEntity().
*
* Note that when '*' is set to true, this allows all unspecified fields to
* be mass assigned. For security purposes, it is advised to set '*' to false
* (or remove it), and explicitly make individual fields accessible as needed.
*
* @var array
*/
protected $_accessible = [
'dst_schluessel' => true,
'dst_name' => true,
'dst_schulart' => true,
'budget' => true
];
}

View File

@@ -0,0 +1,38 @@
<?php
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* WlBudget Entity
*
* @property int $id
* @property string $wl_werteliste_nr
* @property string $wl_kurz_bezeichnung
* @property string $schulart
* @property \Cake\I18n\FrozenTime $created
* @property \Cake\I18n\FrozenTime $modfied
*
* @property \App\Model\Entity\Budget[] $budget
*/
class WlBudget extends Entity
{
/**
* Fields that can be mass assigned using newEntity() or patchEntity().
*
* Note that when '*' is set to true, this allows all unspecified fields to
* be mass assigned. For security purposes, it is advised to set '*' to false
* (or remove it), and explicitly make individual fields accessible as needed.
*
* @var array
*/
protected $_accessible = [
'wl_werteliste_nr' => true,
'wl_kurz_bezeichnung' => true,
'schulart' => true,
'created' => true,
'modfied' => true,
'budget' => true
];
}

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* WlDstTyp Entity
*
* @property int $id
* @property string $key_value
* @property string $short
* @property string $name
* @property \Cake\I18n\FrozenTime $created
* @property \Cake\I18n\FrozenTime $modfied
*/
class WlDstTyp extends Entity
{
/**
* Fields that can be mass assigned using newEntity() or patchEntity().
*
* Note that when '*' is set to true, this allows all unspecified fields to
* be mass assigned. For security purposes, it is advised to set '*' to false
* (or remove it), and explicitly make individual fields accessible as needed.
*
* @var array
*/
protected $_accessible = [
'key_value' => true,
'short' => true,
'name' => true,
'created' => true,
'modfied' => true
];
}

View File

@@ -0,0 +1,38 @@
<?php
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* WlSchooltype Entity
*
* @property int $id
* @property string $key_value
* @property string $short
* @property string $name
* @property \Cake\I18n\FrozenTime $created
* @property \Cake\I18n\FrozenTime $modfied
*
* @property \App\Model\Entity\Budget[] $budget
*/
class WlSchooltype extends Entity
{
/**
* Fields that can be mass assigned using newEntity() or patchEntity().
*
* Note that when '*' is set to true, this allows all unspecified fields to
* be mass assigned. For security purposes, it is advised to set '*' to false
* (or remove it), and explicitly make individual fields accessible as needed.
*
* @var array
*/
protected $_accessible = [
'key_value' => true,
'short' => true,
'name' => true,
'created' => true,
'modfied' => true,
'budget' => true
];
}

View File

@@ -0,0 +1,105 @@
<?php
namespace App\Model\Table;
use Cake\ORM\Query;
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
use Cake\Validation\Validator;
/**
* Budget Model
*
* @property \App\Model\Table\WlSchooltypesTable|\Cake\ORM\Association\BelongsTo $WlSchooltypes
* @property \App\Model\Table\WlBudgetsTable|\Cake\ORM\Association\BelongsTo $WlBudgets
*
* @method \App\Model\Entity\Budget get($primaryKey, $options = [])
* @method \App\Model\Entity\Budget newEntity($data = null, array $options = [])
* @method \App\Model\Entity\Budget[] newEntities(array $data, array $options = [])
* @method \App\Model\Entity\Budget|bool save(\Cake\Datasource\EntityInterface $entity, $options = [])
* @method \App\Model\Entity\Budget patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \App\Model\Entity\Budget[] patchEntities($entities, array $data, array $options = [])
* @method \App\Model\Entity\Budget findOrCreate($search, callable $callback = null, $options = [])
*
* @mixin \Cake\ORM\Behavior\TimestampBehavior
*/
class BudgetTable extends Table
{
/**
* Initialize method
*
* @param array $config The configuration for the Table.
* @return void
*/
public function initialize(array $config)
{
parent::initialize($config);
$this->setTable('budget');
$this->setDisplayField('id');
$this->setPrimaryKey('id');
$this->addBehavior('Timestamp');
$this->belongsTo('WlSchooltypes', [
'foreignKey' => 'wl_schooltype_id',
'joinType' => 'INNER'
]);
$this->belongsTo('WlBudgets', [
'foreignKey' => 'wl_budget_id',
'joinType' => 'INNER'
]);
}
/**
* Default validation rules.
*
* @param \Cake\Validation\Validator $validator Validator instance.
* @return \Cake\Validation\Validator
*/
public function validationDefault(Validator $validator)
{
$validator
->integer('id')
->allowEmpty('id', 'create');
$validator
->scalar('snr')
->maxLength('snr', 4)
->requirePresence('snr', 'create')
->notEmpty('snr');
$validator
->integer('count')
->requirePresence('count', 'create')
->notEmpty('count');
$validator
->scalar('comment')
->maxLength('comment', 255)
->requirePresence('comment', 'create')
->notEmpty('comment');
$validator
->scalar('year')
->requirePresence('year', 'create')
->notEmpty('year');
return $validator;
}
/**
* Returns a rules checker object that will be used for validating
* application integrity.
*
* @param \Cake\ORM\RulesChecker $rules The rules object to be modified.
* @return \Cake\ORM\RulesChecker
*/
public function buildRules(RulesChecker $rules)
{
$rules->add($rules->existsIn(['wl_schooltype_id'], 'WlSchooltypes'));
$rules->add($rules->existsIn(['wl_budget_id'], 'WlBudgets'));
return $rules;
}
}

View File

@@ -0,0 +1,72 @@
<?php
namespace App\Model\Table;
use Cake\ORM\Query;
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
use Cake\Validation\Validator;
/**
* Schools Model
*
* @property \App\Model\Table\BudgetTable|\Cake\ORM\Association\HasMany $Budget
*
* @method \App\Model\Entity\School get($primaryKey, $options = [])
* @method \App\Model\Entity\School newEntity($data = null, array $options = [])
* @method \App\Model\Entity\School[] newEntities(array $data, array $options = [])
* @method \App\Model\Entity\School|bool save(\Cake\Datasource\EntityInterface $entity, $options = [])
* @method \App\Model\Entity\School patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \App\Model\Entity\School[] patchEntities($entities, array $data, array $options = [])
* @method \App\Model\Entity\School findOrCreate($search, callable $callback = null, $options = [])
*/
class SchoolsTable extends Table
{
/**
* Initialize method
*
* @param array $config The configuration for the Table.
* @return void
*/
public function initialize(array $config)
{
parent::initialize($config);
$this->setTable('schools');
$this->setDisplayField('dst_schluessel');
$this->setPrimaryKey('id');
}
/**
* Default validation rules.
*
* @param \Cake\Validation\Validator $validator Validator instance.
* @return \Cake\Validation\Validator
*/
public function validationDefault(Validator $validator)
{
$validator
->integer('id')
->allowEmpty('id', 'create');
$validator
->scalar('dst_schluessel')
->maxLength('dst_schluessel', 4)
->requirePresence('dst_schluessel', 'create')
->notEmpty('dst_schluessel');
$validator
->scalar('dst_name')
->maxLength('dst_name', 255)
->requirePresence('dst_name', 'create')
->notEmpty('dst_name');
$validator
->scalar('dst_schulart')
->maxLength('dst_schulart', 4)
->allowEmpty('dst_schulart');
return $validator;
}
}

View File

@@ -0,0 +1,82 @@
<?php
namespace App\Model\Table;
use Cake\ORM\Query;
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
use Cake\Validation\Validator;
/**
* WlBudgets Model
*
* @property \App\Model\Table\BudgetTable|\Cake\ORM\Association\HasMany $Budget
*
* @method \App\Model\Entity\WlBudget get($primaryKey, $options = [])
* @method \App\Model\Entity\WlBudget newEntity($data = null, array $options = [])
* @method \App\Model\Entity\WlBudget[] newEntities(array $data, array $options = [])
* @method \App\Model\Entity\WlBudget|bool save(\Cake\Datasource\EntityInterface $entity, $options = [])
* @method \App\Model\Entity\WlBudget patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \App\Model\Entity\WlBudget[] patchEntities($entities, array $data, array $options = [])
* @method \App\Model\Entity\WlBudget findOrCreate($search, callable $callback = null, $options = [])
*
* @mixin \Cake\ORM\Behavior\TimestampBehavior
*/
class WlBudgetsTable extends Table
{
/**
* Initialize method
*
* @param array $config The configuration for the Table.
* @return void
*/
public function initialize(array $config)
{
parent::initialize($config);
$this->setTable('wl_budgets');
$this->setDisplayField('wl_kurz_bezeichnung');
$this->setPrimaryKey('id');
$this->addBehavior('Timestamp');
$this->hasMany('Budget', [
'foreignKey' => 'wl_budget_id'
]);
}
/**
* Default validation rules.
*
* @param \Cake\Validation\Validator $validator Validator instance.
* @return \Cake\Validation\Validator
*/
public function validationDefault(Validator $validator)
{
$validator
->integer('id')
->allowEmpty('id', 'create');
$validator
->scalar('wl_werteliste_nr')
->maxLength('wl_werteliste_nr', 10)
->allowEmpty('wl_werteliste_nr');
$validator
->scalar('wl_kurz_bezeichnung')
->maxLength('wl_kurz_bezeichnung', 30)
->allowEmpty('wl_kurz_bezeichnung');
$validator
->scalar('schulart')
->maxLength('schulart', 10)
->allowEmpty('schulart');
$validator
->dateTime('modfied')
->requirePresence('modfied', 'create')
->notEmpty('modfied');
return $validator;
}
}

View File

@@ -0,0 +1,79 @@
<?php
namespace App\Model\Table;
use Cake\ORM\Query;
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
use Cake\Validation\Validator;
/**
* WlDstTyp Model
*
* @method \App\Model\Entity\WlDstTyp get($primaryKey, $options = [])
* @method \App\Model\Entity\WlDstTyp newEntity($data = null, array $options = [])
* @method \App\Model\Entity\WlDstTyp[] newEntities(array $data, array $options = [])
* @method \App\Model\Entity\WlDstTyp|bool save(\Cake\Datasource\EntityInterface $entity, $options = [])
* @method \App\Model\Entity\WlDstTyp patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \App\Model\Entity\WlDstTyp[] patchEntities($entities, array $data, array $options = [])
* @method \App\Model\Entity\WlDstTyp findOrCreate($search, callable $callback = null, $options = [])
*
* @mixin \Cake\ORM\Behavior\TimestampBehavior
*/
class WlDstTypTable extends Table
{
/**
* Initialize method
*
* @param array $config The configuration for the Table.
* @return void
*/
public function initialize(array $config)
{
parent::initialize($config);
$this->setTable('wl_dst_typ');
$this->setDisplayField('name');
$this->setPrimaryKey('id');
$this->addBehavior('Timestamp');
}
/**
* Default validation rules.
*
* @param \Cake\Validation\Validator $validator Validator instance.
* @return \Cake\Validation\Validator
*/
public function validationDefault(Validator $validator)
{
$validator
->integer('id')
->allowEmpty('id', 'create');
$validator
->scalar('key_value')
->maxLength('key_value', 4)
->requirePresence('key_value', 'create')
->notEmpty('key_value');
$validator
->scalar('short')
->maxLength('short', 10)
->requirePresence('short', 'create')
->notEmpty('short');
$validator
->scalar('name')
->maxLength('name', 30)
->requirePresence('name', 'create')
->notEmpty('name');
$validator
->dateTime('modfied')
->requirePresence('modfied', 'create')
->notEmpty('modfied');
return $validator;
}
}

View File

@@ -0,0 +1,85 @@
<?php
namespace App\Model\Table;
use Cake\ORM\Query;
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
use Cake\Validation\Validator;
/**
* WlSchooltypes Model
*
* @property \App\Model\Table\BudgetTable|\Cake\ORM\Association\HasMany $Budget
*
* @method \App\Model\Entity\WlSchooltype get($primaryKey, $options = [])
* @method \App\Model\Entity\WlSchooltype newEntity($data = null, array $options = [])
* @method \App\Model\Entity\WlSchooltype[] newEntities(array $data, array $options = [])
* @method \App\Model\Entity\WlSchooltype|bool save(\Cake\Datasource\EntityInterface $entity, $options = [])
* @method \App\Model\Entity\WlSchooltype patchEntity(\Cake\Datasource\EntityInterface $entity, array $data, array $options = [])
* @method \App\Model\Entity\WlSchooltype[] patchEntities($entities, array $data, array $options = [])
* @method \App\Model\Entity\WlSchooltype findOrCreate($search, callable $callback = null, $options = [])
*
* @mixin \Cake\ORM\Behavior\TimestampBehavior
*/
class WlSchooltypesTable extends Table
{
/**
* Initialize method
*
* @param array $config The configuration for the Table.
* @return void
*/
public function initialize(array $config)
{
parent::initialize($config);
$this->setTable('wl_schooltypes');
$this->setDisplayField('short');
$this->setPrimaryKey('id');
$this->addBehavior('Timestamp');
$this->hasMany('Budget', [
'foreignKey' => 'wl_schooltype_id'
]);
}
/**
* Default validation rules.
*
* @param \Cake\Validation\Validator $validator Validator instance.
* @return \Cake\Validation\Validator
*/
public function validationDefault(Validator $validator)
{
$validator
->integer('id')
->allowEmpty('id', 'create');
$validator
->scalar('key_value')
->maxLength('key_value', 4)
->requirePresence('key_value', 'create')
->notEmpty('key_value');
$validator
->scalar('short')
->maxLength('short', 10)
->requirePresence('short', 'create')
->notEmpty('short');
$validator
->scalar('name')
->maxLength('name', 30)
->requirePresence('name', 'create')
->notEmpty('name');
$validator
->dateTime('modfied')
->requirePresence('modfied', 'create')
->notEmpty('modfied');
return $validator;
}
}