KK
Size: a a a
KK
KK
AP
AP
RF
D
ML
ℳ𝓀
🎃
BC
А
SG
SG
VY
ad_of_sales
(id
bigint unsigned not null auto_increment primary key, package_type_id
bigint unsigned not null, city_id
bigint unsigned not null, material_type_id
bigint unsigned not null, name
varchar(255) not null comment 'Наименование', desc
text null comment 'Описание', is_geo
tinyint(1) not null default '0' comment 'Метка геопозиции', is_phone
tinyint(1) not null default '0' comment 'Метка телефона', placement_at
timestamp not null comment 'Дата размещения', completion_at
timestamp not null comment 'Дата завершения', is_weight
tinyint(1) not null default '1' comment 'Метка веса', avg_package_weight
double(8, 3) null comment 'Средний вес упаковки', total_weight
double(8, 3) null comment 'Общий вес', package_width
double(8, 3) null comment 'Ширина упаковки', package_depth
double(8, 3) null comment 'Глубина упаковки', package_height
double(8, 3) null comment 'Высота упаковки', total_volume
double(8, 3) null comment 'Общий обьём', count_of_packages
int null comment 'Количество упаковок', package_price
double(8, 2) null comment 'Цена за упаковку', total_price
double(8, 2) not null comment 'Цена выкупа', created_at
timestamp null, updated_at
timestamp null, deleted_at
timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') 'completion_at
timestamp not null comment 'Дата завершения',`D
BC
D
ad_of_sales
(id
bigint unsigned not null auto_increment primary key, package_type_id
bigint unsigned not null, city_id
bigint unsigned not null, material_type_id
bigint unsigned not null, name
varchar(255) not null comment 'Наименование', desc
text null comment 'Описание', is_geo
tinyint(1) not null default '0' comment 'Метка геопозиции', is_phone
tinyint(1) not null default '0' comment 'Метка телефона', placement_at
timestamp not null comment 'Дата размещения', completion_at
timestamp not null comment 'Дата завершения', is_weight
tinyint(1) not null default '1' comment 'Метка веса', avg_package_weight
double(8, 3) null comment 'Средний вес упаковки', total_weight
double(8, 3) null comment 'Общий вес', package_width
double(8, 3) null comment 'Ширина упаковки', package_depth
double(8, 3) null comment 'Глубина упаковки', package_height
double(8, 3) null comment 'Высота упаковки', total_volume
double(8, 3) null comment 'Общий обьём', count_of_packages
int null comment 'Количество упаковок', package_price
double(8, 2) null comment 'Цена за упаковку', total_price
double(8, 2) not null comment 'Цена выкупа', created_at
timestamp null, updated_at
timestamp null, deleted_at
timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') 'completion_at
timestamp not null comment 'Дата завершения',`SG
VY
VY
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAdOfSales extends Migration
{
public function up()
{
\Schema::create(
'ad_of_sales',
function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('package_type_id')->unsigned()->index();
$table->foreign('package_type_id')
->references('id')->on('package_types')
->onUpdate('cascade')->onDelete('cascade');
$table->bigInteger('city_id')->unsigned()->index();
$table->foreign('city_id')
->references('id')->on('cities')
->onUpdate('cascade')->onDelete('cascade');
$table->bigInteger('material_type_id')->unsigned()->index();
$table->foreign('material_type_id')
->references('id')->on('material_types')
->onUpdate('cascade')->onDelete('cascade');
$table->string('name', 255)->comment('Наименование');
$table->text('desc')->nullable()->comment('Описание');
$table->boolean('is_geo')->default(false)->comment('Метка геопозиции');
$table->boolean('is_phone')->default(false)->comment('Метка телефона');
$table->timestamp('placement_at')->comment('Дата размещения');
$table->timestamp('completion_at')->comment('Дата завершения');
$table->boolean('is_weight')->default(true)->comment('Метка веса');
$table->float('avg_package_weight', 8, 3)->nullable()->comment('Средний вес упаковки');
$table->float('total_weight', 8, 3)->nullable()->comment('Общий вес');
$table->float('package_width', 8, 3)->nullable()->comment('Ширина упаковки');
$table->float('package_depth', 8, 3)->nullable()->comment('Глубина упаковки');
$table->float('package_height', 8, 3)->nullable()->comment('Высота упаковки');
$table->float('total_volume', 8, 3)->nullable()->comment('Общий обьём');
$table->integer('count_of_packages')->nullable()->comment('Количество упаковок');
$table->float('package_price', 8, 2)->nullable()->comment('Цена за упаковку');
$table->float('total_price', 8, 2)->comment('Цена выкупа');
$table->timestamps();
$table->softDeletes();
}
);
}
public function down()
{
\Schema::dropIfExists('ad_of_sales');
}
}