ldc-arcadia-api/database/arcadia-replicate/Views/Refp/IncoArticleView.php

91 lines
4.6 KiB
PHP

<?php
declare(strict_types=1);
namespace Database\ArcadiaReplicate\Views\Refp;
use Database\ArcadiaReplicate\IdentifiesTableOrView;
use Database\ArcadiaReplicate\TableOrView;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Schema\Builder;
/**
* Schéma Oracle : REFP.INCO_ARTICLE
* Type : VIEW
* Description : Réplication miroir pour INCO_ARTICLE
*/
final class IncoArticleView implements TableOrView
{
use IdentifiesTableOrView;
public static function schemaName(): string
{
return 'REFP';
}
public static function name(): string
{
return 'INCO_ARTICLE';
}
public static function isView(): bool
{
return true;
}
public static function description(): string
{
return 'Objet miroir VIEW REFP.INCO_ARTICLE du métamodèle Arcadia.';
}
public static function up(Builder $schema): void
{
if (app()->environment('local', 'testing')) {
$schema->dropIfExists(self::table($schema->getConnection()));
}
$schema->create(self::table($schema->getConnection()), function (Blueprint $table): void {
$table->bigInteger('NO_ART')->comment('Oracle: NUMBER(0, 0) [PK]');
$table->string('LIB_CCIAL', 140)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
$table->bigInteger('COD_SOC_IA')->comment('Oracle: NUMBER(0, 0) [PK]');
$table->smallInteger('DLC_CCIAL')->nullable()->comment('Oracle: NUMBER(4, 0)');
$table->smallInteger('DTS')->nullable()->comment('Oracle: NUMBER(4, 0)');
$table->smallInteger('DUREE_VIE')->nullable()->comment('Oracle: NUMBER(4, 0)');
$table->string('ORI_PROD_INCO', 80)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
$table->unsignedBigInteger('TARE_PRIVE')->nullable()->comment('Oracle: NUMBER(10, 0)');
$table->decimal('POIDS_MINI', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
$table->decimal('POIDS_MAXI', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
$table->bigInteger('UVERSION')->nullable()->comment('Oracle: NUMBER(0, 0)');
$table->decimal('POIDS_MOY_CALCULE', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
$table->decimal('LONGUEUR_PRODUIT', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
$table->decimal('LARGUEUR_PRODUIT', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
$table->decimal('HAUTEUR_PRODUIT', 16, 6)->nullable()->comment('Oracle: NUMBER(16, 6)');
$table->bigInteger('POIDS_MOY_UNI')->nullable()->comment('Oracle: NUMBER(0, 0)');
$table->bigInteger('COD_TYP_CONDIT_PUB')->nullable()->comment('Oracle: NUMBER(0, 0)');
$table->string('COD_NDP', 100)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
$table->smallInteger('COD_FAMVTE')->nullable()->comment('Oracle: NUMBER(3, 0)');
$table->string('COD_GENCOD_ADM', 52)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
$table->string('COD_GENCOD_SYMB', 52)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
$table->boolean('IS_HALLAL')->nullable()->comment('Oracle: NUMBER(1, 0)');
$table->text('LIB_CAISSE')->nullable()->comment('Oracle: VARCHAR2(0, 0)');
$table->bigInteger('COD_MARQUE')->nullable()->comment('Oracle: NUMBER(0, 0)');
$table->boolean('COD_POID_CST_UVC')->nullable()->comment('Oracle: NUMBER(1, 0)');
$table->bigInteger('COD_SOUSFAM')->nullable()->comment('Oracle: NUMBER(0, 0)');
$table->smallInteger('FRAIS_CONGELE')->nullable()->comment('Oracle: NUMBER(2, 0)');
$table->smallInteger('UTILISABLE_GROUPE')->nullable()->comment('Oracle: NUMBER(2, 0)');
$table->string('LIB_COMPOSTAGE', 120)->nullable()->comment('Oracle: VARCHAR2(0, 0)');
$table->unsignedBigInteger('SITE_REF_INCO')->nullable()->comment('Oracle: NUMBER(10, 0)');
$table->bigInteger('COD_ART_ASSO_COMP')->nullable()->comment('Oracle: NUMBER(0, 0)');
$table->bigInteger('COD_ART_ASSOCIE')->nullable()->comment('Oracle: NUMBER(0, 0)');
$table->smallInteger('DLC_RM')->nullable()->comment('Oracle: NUMBER(4, 0)');
$table->smallInteger('TYPE_PRODUCTION')->nullable()->comment('Oracle: NUMBER(3, 0)');
$table->smallInteger('CALIBRE_OEUFS')->nullable()->comment('Oracle: NUMBER(3, 0)');
$table->primary(['NO_ART', 'COD_SOC_IA']);
});
}
public static function down(Builder $schema): void
{
$schema->dropIfExists(self::table($schema->getConnection()));
}
}