You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Production.php 904B

8 jaren geleden
8 jaren geleden
8 jaren geleden
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "production".
  6. *
  7. * @property integer $id
  8. * @property string $date
  9. * @property integer $actif
  10. */
  11. class Production extends \yii\db\ActiveRecord
  12. {
  13. /**
  14. * @inheritdoc
  15. */
  16. public static function tableName()
  17. {
  18. return 'production';
  19. }
  20. public function getEtablissement() {
  21. return $this->hasOne(Etablissement::className(), ['id'=>'id_etablissement']) ;
  22. }
  23. /**
  24. * @inheritdoc
  25. */
  26. public function rules()
  27. {
  28. return [
  29. [['date'], 'required'],
  30. [['date'], 'safe'],
  31. [['actif'], 'integer']
  32. ];
  33. }
  34. /**
  35. * @inheritdoc
  36. */
  37. public function attributeLabels()
  38. {
  39. return [
  40. 'id' => 'ID',
  41. 'date' => 'Date',
  42. 'actif' => 'Actif',
  43. ];
  44. }
  45. }