|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
-
- namespace common\models;
-
- use Yii;
-
-
- class Production extends \yii\db\ActiveRecord
- {
-
-
- public static function tableName()
- {
- return 'production';
- }
-
- public function getEtablissement() {
- return $this->hasOne(Etablissement::className(), ['id'=>'id_etablissement']) ;
- }
-
-
-
- public function rules()
- {
- return [
- [['date'], 'required'],
- [['date'], 'safe'],
- [['actif'], 'integer']
- ];
- }
-
-
-
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'date' => 'Date',
- 'actif' => 'Actif',
- ];
- }
-
-
- }
|