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.

66 lines
1.6KB

  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. use yii\base\Model;
  5. /**
  6. * Login form
  7. */
  8. class CommandeAutoForm extends Model
  9. {
  10. public $id ;
  11. public $id_user ;
  12. public $id_etablissement ;
  13. public $id_point_vente ;
  14. public $date_debut;
  15. public $date_fin ;
  16. public $lundi ;
  17. public $mardi ;
  18. public $mercredi ;
  19. public $jeudi ;
  20. public $vendredi ;
  21. public $samedi ;
  22. public $dimanche ;
  23. public $periodicite_semaine ;
  24. public $produits ;
  25. /**
  26. * @inheritdoc
  27. */
  28. public function rules()
  29. {
  30. return [
  31. [['id_user', 'id_etablissement', 'periodicite_semaine'], 'integer'],
  32. [['date_debut', 'date_fin'], 'date'],
  33. [['lundi','mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi', 'dimanche'], 'boolean'],
  34. [['id_user', 'id_etablissement'],'required', 'message' => 'Champs obligatoire']
  35. ];
  36. }
  37. public function attributeLabels()
  38. {
  39. return [
  40. 'id' => 'ID',
  41. 'id_user' => 'Utilisateur',
  42. 'id_etablissement' => 'ID Etablissement',
  43. 'id_point_vente' => 'Point de vente',
  44. 'date_debut' => 'Date de début',
  45. 'date_fin' => 'Date de fin',
  46. 'lundi' => 'Lundi',
  47. 'mardi' => 'Mardi',
  48. 'mercredi' => 'Mercredi',
  49. 'jeudi' => 'Jeudi',
  50. 'vendredi' => 'Vendredi',
  51. 'samedi' => 'Samedi',
  52. 'dimanche' => 'Dimanche',
  53. 'periodicite_semaine' => 'Périodicité (semaines)',
  54. ];
  55. }
  56. public function save()
  57. {
  58. }
  59. }