Commit 9dbf4827 authored by TTS Tran Viet Anh's avatar TTS Tran Viet Anh

fix ENABLE -> ENABLED

parent cada8274
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
class PostCategory extends Model class PostCategory extends Model
{ {
const STATUS_ENABLE = 1; const STATUS_ENABLED = 1;
const STATUS_DISABLE = 2; const STATUS_DISABLE = 2;
const STATUS_DELETED = 3; const STATUS_DELETED = 3;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
class Product extends Model class Product extends Model
{ {
const STATUS_ENABLE = 1; const STATUS_ENABLED = 1;
const STATUS_DISABLE = 2; const STATUS_DISABLE = 2;
const STATUS_DELETED = 3; const STATUS_DELETED = 3;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
class ProductCategory extends Model class ProductCategory extends Model
{ {
const STATUS_ENABLE = 1; const STATUS_ENABLED = 1;
const STATUS_DISABLE = 2; const STATUS_DISABLE = 2;
const STATUS_DELETED = 3; const STATUS_DELETED = 3;
......
...@@ -17,8 +17,8 @@ public function definition() ...@@ -17,8 +17,8 @@ public function definition()
return [ return [
'name' => $this->faker->sentence(1), 'name' => $this->faker->sentence(1),
'image' => $this->faker->imageUrl(80, 640, 'Post category', true), 'image' => $this->faker->imageUrl(80, 640, 'Post category', true),
'parent_id' => rand(0, 1) ? null : rand(1, 10), 'parent_id' => rand(0, 1) ? null : rand(1, 5),
'status' => PostCategory::STATUS_ENABLE, 'status' => PostCategory::STATUS_ENABLED,
'ordering' => rand(1, 3), 'ordering' => rand(1, 3),
]; ];
} }
......
...@@ -17,8 +17,8 @@ public function definition() ...@@ -17,8 +17,8 @@ public function definition()
return [ return [
'name' => $this->faker->sentence(1), 'name' => $this->faker->sentence(1),
'image' => $this->faker->imageUrl(80, 640, 'product category', true), 'image' => $this->faker->imageUrl(80, 640, 'product category', true),
'parent_id' => rand(0, 1) ? null : rand(1, 10), 'parent_id' => rand(0, 1) ? null : rand(1, 5),
'status' => ProductCategory::STATUS_ENABLE, 'status' => ProductCategory::STATUS_ENABLED,
'ordering' => rand(1, 3), 'ordering' => rand(1, 3),
]; ];
} }
......
...@@ -22,7 +22,7 @@ public function definition() ...@@ -22,7 +22,7 @@ public function definition()
'price' => $this->faker->randomFloat(2, 10, 200), 'price' => $this->faker->randomFloat(2, 10, 200),
'product_category_id' => ProductCategory::inRandomOrder()->first()->id ?? null, 'product_category_id' => ProductCategory::inRandomOrder()->first()->id ?? null,
'stock' => $this->faker->numberBetween(0, 200), 'stock' => $this->faker->numberBetween(0, 200),
'status' => Product::STATUS_ENABLE, 'status' => Product::STATUS_ENABLED,
]; ];
} }
} }
...@@ -22,7 +22,7 @@ public function up() ...@@ -22,7 +22,7 @@ public function up()
$table->decimal('price', 8, 2); $table->decimal('price', 8, 2);
$table->unsignedInteger('product_category_id'); $table->unsignedInteger('product_category_id');
$table->unsignedInteger('stock'); $table->unsignedInteger('stock');
$table->unsignedTinyInteger('status')->default(Product::STATUS_ENABLE); $table->unsignedTinyInteger('status')->default(Product::STATUS_ENABLED);
$table->softDeletes(); $table->softDeletes();
$table->timestamps(); $table->timestamps();
}); });
......
...@@ -19,7 +19,7 @@ public function up() ...@@ -19,7 +19,7 @@ public function up()
$table->string('name'); $table->string('name');
$table->string('image'); $table->string('image');
$table->unsignedInteger('parent_id')->nullable(); $table->unsignedInteger('parent_id')->nullable();
$table->unsignedTinyInteger('status')->default(ProductCategory::STATUS_ENABLE); $table->unsignedTinyInteger('status')->default(ProductCategory::STATUS_ENABLED);
$table->unsignedInteger('ordering'); $table->unsignedInteger('ordering');
$table->softDeletes(); $table->softDeletes();
$table->timestamps(); $table->timestamps();
......
...@@ -19,7 +19,7 @@ public function up() ...@@ -19,7 +19,7 @@ public function up()
$table->string('name'); $table->string('name');
$table->string('image'); $table->string('image');
$table->unsignedInteger('parent_id')->nullable(); $table->unsignedInteger('parent_id')->nullable();
$table->unsignedTinyInteger('status')->default(PostCategory::STATUS_ENABLE); $table->unsignedTinyInteger('status')->default(PostCategory::STATUS_ENABLED);
$table->unsignedInteger('ordering'); $table->unsignedInteger('ordering');
$table->softDeletes(); $table->softDeletes();
$table->timestamps(); $table->timestamps();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment