summaryrefslogtreecommitdiff
path: root/protected/models/Standort.php
diff options
context:
space:
mode:
Diffstat (limited to 'protected/models/Standort.php')
-rw-r--r--protected/models/Standort.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/protected/models/Standort.php b/protected/models/Standort.php
index 48493f6..d62a594 100644
--- a/protected/models/Standort.php
+++ b/protected/models/Standort.php
@@ -5,6 +5,7 @@
*
* The followings are the available columns in table 'standort':
* @property integer $id
+ * @property string $type
* @property string $name
* @property double $pos_lat
* @property double $pos_long
@@ -32,7 +33,7 @@ class Standort extends CActiveRecord
*/
public function tableName()
{
- return 'standort';
+ return 'standorte';
}
/**
@@ -43,13 +44,14 @@ class Standort extends CActiveRecord
// NOTE: you should only define rules for those attributes that
// will receive user inputs.
return array(
- array('name, pos_lat, pos_long', 'required'),
+ array('name, pos_lat, pos_long, type', 'required'),
array('published', 'numerical', 'integerOnly'=>true),
array('pos_lat, pos_long', 'numerical'),
+ array('type', 'length', 'max'=>6),
array('name', 'length', 'max'=>80),
// The following rule is used by search().
// Please remove those attributes that should not be searched.
- array('id, name, pos_lat, pos_long, published', 'safe', 'on'=>'search'),
+ array('id, type, name, pos_lat, pos_long, published', 'safe', 'on'=>'search'),
);
}
@@ -71,6 +73,7 @@ class Standort extends CActiveRecord
{
return array(
'id' => 'ID',
+ 'type' => 'Typ',
'name' => 'Name',
'pos_lat' => 'Pos Lat',
'pos_long' => 'Pos Long',
@@ -90,6 +93,7 @@ class Standort extends CActiveRecord
$criteria=new CDbCriteria;
$criteria->compare('id',$this->id);
+ $criteria->compare('type',$this->type,true);
$criteria->compare('name',$this->name,true);
$criteria->compare('pos_lat',$this->pos_lat);
$criteria->compare('pos_long',$this->pos_long);
@@ -99,4 +103,10 @@ class Standort extends CActiveRecord
'criteria'=>$criteria,
));
}
+
+ public function behaviors() {
+ return array(
+ 'LoggableBehavior'=>'application.modules.auditTrail.behaviors.LoggableBehavior',
+ );
+ }
} \ No newline at end of file