소스 검색

Ajout du champs "default" au modèle PointSale

dev
부모
커밋
924f50f70d
2개의 변경된 파일19개의 추가작업 그리고 2개의 파일을 삭제
  1. +4
    -2
      common/models/PointSale.php
  2. +15
    -0
      console/migrations/m190220_073434_ajout_champs_point_vente_defaut.php

+ 4
- 2
common/models/PointSale.php 파일 보기

@@ -51,6 +51,7 @@ use common\components\ActiveRecordCommon ;
* @property string $name
* @property string $address
* @property integer $id_producer
* @property integer $default
*/
class PointSale extends ActiveRecordCommon
{
@@ -83,7 +84,7 @@ class PointSale extends ActiveRecordCommon
'infos_saturday', 'infos_sunday','credit_functioning'], 'string'],
[['point_production', 'credit', 'delivery_monday', 'delivery_tuesday',
'delivery_wednesday', 'delivery_thursday', 'delivery_friday',
'delivery_saturday', 'delivery_sunday'], 'boolean'],
'delivery_saturday', 'delivery_sunday','default'], 'boolean'],
['point_production', 'default', 'value' => 0],
['id_producer', 'integer'],
['id_producer', 'required'],
@@ -119,7 +120,8 @@ class PointSale extends ActiveRecordCommon
'delivery_saturday' => 'Samedi',
'delivery_sunday' => 'Dimanche',
'code' => 'Code',
'credit_functioning' => 'Utilisation du Crédit par l\'utilisateur'
'credit_functioning' => 'Utilisation du Crédit par l\'utilisateur',
'default' => 'Point de vente par défaut',
];
}


+ 15
- 0
console/migrations/m190220_073434_ajout_champs_point_vente_defaut.php 파일 보기

@@ -0,0 +1,15 @@
<?php

use yii\db\Migration;
use yii\db\mysql\Schema;

class m190220_073434_ajout_champs_point_vente_defaut extends Migration {

public function up() {
$this->addColumn('point_sale', 'default', Schema::TYPE_BOOLEAN) ;
}

public function down() {
$this->dropColumn('point_sale', 'default') ;
}
}

Loading…
취소
저장