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.

OrderStatus.php 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace common\models;
  3. use common\components\ActiveRecordCommon;
  4. use Yii;
  5. /**
  6. * This is the model class for table "order_status".
  7. *
  8. * @property integer $id
  9. * @property string $name
  10. */
  11. class OrderStatus extends ActiveRecordCommon
  12. {
  13. /**
  14. * @inheritdoc
  15. */
  16. public static function tableName()
  17. {
  18. return 'order_status';
  19. }
  20. /**
  21. * @inheritdoc
  22. */
  23. public function rules()
  24. {
  25. return [
  26. [['name'], 'string', 'max' => 255],
  27. ];
  28. }
  29. /**
  30. * @inheritdoc
  31. */
  32. public function attributeLabels()
  33. {
  34. return [
  35. 'id' => 'ID',
  36. 'name' => 'Nom',
  37. ];
  38. }
  39. /**
  40. * Retourne les options de base nécessaires à la fonction de recherche.
  41. *
  42. * @return array
  43. */
  44. public static function defaultOptionsSearch() {
  45. return [
  46. 'with' => [],
  47. 'join_with' => ['user', 'order'],
  48. 'orderby' => 'id ASC',
  49. 'attribute_id_producer' => ''
  50. ] ;
  51. }
  52. }