MaterielsFixture.php 20.2 KB
<?php
namespace App\Test\Fixture;

use Cake\TestSuite\Fixture\TestFixture;

/**
 * MaterielsFixture
 *
 */
class MaterielsFixture extends TestFixture
{

    /**
     * Fields
     *
     * @var array
     */
    // @codingStandardsIgnoreStart
    public $fields = [
        'id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => false, 'default' => null, 'comment' => '', 'autoIncrement' => true, 'precision' => null],
        'designation' => ['type' => 'string', 'length' => 50, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'sur_categorie_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
        'categorie_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
        'sous_categorie_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
        'numero_laboratoire' => ['type' => 'string', 'length' => 14, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'description' => ['type' => 'text', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
        'materiel_administratif' => ['type' => 'boolean', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
        'materiel_technique' => ['type' => 'boolean', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
        'status' => ['type' => 'string', 'length' => 15, 'null' => true, 'default' => 'CREATED', 'comment' => '', 'precision' => null, 'fixed' => null],
        'date_acquisition' => ['type' => 'date', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
    	'date_fin_garantie' => ['type' => 'date', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
    	'duree_garantie' => ['type' => 'integer', 'length' => 10, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
    	'unite_duree_garantie' => ['type' => 'string', 'length' => 30, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
    	'fournisseur' => ['type' => 'string', 'length' => 50, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'prix_ht' => ['type' => 'float', 'length' => 45, 'precision' => 0, 'unsigned' => true, 'null' => true, 'default' => null, 'comment' => ''],
        'eotp' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'numero_commande' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'code_comptable' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'numero_serie' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'groupes_thematique_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
        'groupes_metier_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
        'numero_inventaire_organisme' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'numero_inventaire_old' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => 'Ancien numero inventaire', 'precision' => null, 'fixed' => null],
        'date_archivage' => ['type' => 'date', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
        'etiquette' => ['type' => 'boolean', 'length' => null, 'null' => true, 'default' => '0', 'comment' => 'etiquette sur materiel oui ou non', 'precision' => null],
        'lieu_detail' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'nom_responsable' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'email_responsable' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'fixed' => null],
        'nom_createur' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => 'nom du createur de la fiche', 'precision' => null, 'fixed' => null],
        'nom_modificateur' => ['type' => 'string', 'length' => 45, 'null' => true, 'default' => null, 'comment' => 'nom du modificateur de la fiche', 'precision' => null, 'fixed' => null],
        'created' => ['type' => 'datetime', 'length' => null, 'null' => true, 'default' => null, 'comment' => 'date et heure de creation de la fiche', 'precision' => null],
        'modified' => ['type' => 'datetime', 'length' => null, 'null' => true, 'default' => null, 'comment' => 'date et heure de modif de la fiche', 'precision' => null],
        'date_reception' => ['type' => 'date', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
        'organisme_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null, 'autoIncrement' => null],
        'site_id' => ['type' => 'integer', 'length' => 11, 'unsigned' => false, 'null' => true, 'default' => '2', 'comment' => '', 'precision' => null, 'autoIncrement' => null],
    	'hors_service' => ['type' => 'boolean', 'length' => null, 'null' => true, 'default' => null, 'comment' => '', 'precision' => null],
    	'_indexes' => [
            'fk_administrative_materials_sub_categories1' => ['type' => 'index', 'columns' => ['sous_categorie_id'], 'length' => []],
            'fk_materials_thematic_group1' => ['type' => 'index', 'columns' => ['groupes_thematique_id'], 'length' => []],
            'fk_materials_work_group1' => ['type' => 'index', 'columns' => ['groupes_metier_id'], 'length' => []],
            'fk_materiels_categories1' => ['type' => 'index', 'columns' => ['categorie_id'], 'length' => []],
            'fk_materiels_sur_categorie_id' => ['type' => 'index', 'columns' => ['sur_categorie_id'], 'length' => []],
            'fk_materiels_organisme_id' => ['type' => 'index', 'columns' => ['organisme_id'], 'length' => []],
            'fk_materiels_site_id' => ['type' => 'index', 'columns' => ['site_id'], 'length' => []],
        ],
        '_constraints' => [
            'primary' => ['type' => 'primary', 'columns' => ['id'], 'length' => []],
            'numero_irap' => ['type' => 'unique', 'columns' => ['numero_laboratoire'], 'length' => []],
            'fk_administrative_materials_sub_categories1' => ['type' => 'foreign', 'columns' => ['sous_categorie_id'], 'references' => ['sous_categories', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
            'fk_materials_thematic_group1' => ['type' => 'foreign', 'columns' => ['groupes_thematique_id'], 'references' => ['groupes_thematiques', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
            'fk_materials_work_group1' => ['type' => 'foreign', 'columns' => ['groupes_metier_id'], 'references' => ['groupes_metiers', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
            'fk_materiels_categories1' => ['type' => 'foreign', 'columns' => ['categorie_id'], 'references' => ['categories', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
            'fk_materiels_organisme_id' => ['type' => 'foreign', 'columns' => ['organisme_id'], 'references' => ['organismes', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
            'fk_materiels_site_id' => ['type' => 'foreign', 'columns' => ['site_id'], 'references' => ['sites', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
            'fk_materiels_sur_categorie_id' => ['type' => 'foreign', 'columns' => ['sur_categorie_id'], 'references' => ['sur_categories', 'id'], 'update' => 'noAction', 'delete' => 'noAction', 'length' => []],
        ],
        '_options' => [
            'engine' => 'InnoDB',
            'collation' => 'latin1_swedish_ci'
        ],
    ];
    // @codingStandardsIgnoreEnd

    /**
     * Records
     *
     * @var array
     */
    public $records = [
        [
            'id' => 1,
            'designation' => '1 tseT',
            'sur_categorie_id' => 1,
            'categorie_id' => 1,
            'sous_categorie_id' => 1,
            'numero_laboratoire' => 'TEST-2016-0001',
            'description' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
            'materiel_administratif' => 1,
            'materiel_technique' => 1,
            'status' => 'CREATED',
            'date_acquisition' => '2014-04-19',
            'fournisseur' => 'Lorem ipsum dolor sit amet',
            'prix_ht' => 25,
            'eotp' => 'Lorem ipsum dolor sit amet',
            'numero_commande' => 'Lorem ipsum dolor sit amet',
            'code_comptable' => 'Lorem ipsum dolor sit amet',
            'numero_serie' => 'Lorem ipsum dolor sit amet',
            'groupes_thematique_id' => 1,
            'groupes_metier_id' => 1,
            'numero_inventaire_organisme' => 'Lorem ipsum dolor sit amet',
            'numero_inventaire_old' => 'Lorem ipsum dolor sit amet',
            'date_archivage' => '2016-04-19',
            'etiquette' => 1,
            'lieu_detail' => 'Lorem ipsum dolor sit amet',
            'nom_responsable' => 'Lorem ipsum dolor sit amet',
            'email_responsable' => 'Lorem ipsum dolor sit amet',
            'nom_createur' => 'Lorem ipsum dolor sit amet',
            'nom_modificateur' => 'Lorem ipsum dolor sit amet',
            'created' => '2016-04-19 09:09:29',
            'modified' => '2016-04-19 09:09:29',
            'date_reception' => '2016-04-19',
            'organisme_id' => 1,
            'site_id' => 1
        ],
    	[
    		'id' => 2,
    		'designation' => 'Test 2',
    		'sur_categorie_id' => 1,
    		'categorie_id' => 1,
    		'sous_categorie_id' => 1,
    		'numero_laboratoire' => 'TEST-2016-0002',
    		'description' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
    		'materiel_administratif' => 1,
    		'materiel_technique' => 1,
    		'status' => 'CREATED',
    		'date_acquisition' => '2015-04-19',
    		'fournisseur' => 'Lorem ipsum dolor sit amet',
    		'prix_ht' => 50,
    		'eotp' => 'Lorem ipsum dolor sit amet',
    		'numero_commande' => 'Lorem ipsum dolor sit amet',
    		'code_comptable' => 'Lorem ipsum dolor sit amet',
    		'numero_serie' => 'Lorem ipsum dolor sit amet',
    		'groupes_thematique_id' => 1,
    		'groupes_metier_id' => 1,
    		'numero_inventaire_organisme' => 'Lorem ipsum dolor sit amet',
    		'numero_inventaire_old' => 'Lorem ipsum dolor sit amet',
    		'date_archivage' => '2016-04-19',
    		'etiquette' => 1,
    		'lieu_detail' => 'Lorem ipsum dolor sit amet',
    		'nom_responsable' => 'Lorem ipsum dolor sit amet',
    		'email_responsable' => 'Lorem ipsum dolor sit amet',
    		'nom_createur' => 'Lorem ipsum dolor sit amet',
    		'nom_modificateur' => 'Lorem ipsum dolor sit amet',
    		'created' => '2016-04-19 09:09:29',
    		'modified' => '2016-04-19 09:09:29',
    		'date_reception' => '2016-04-19',
    		'organisme_id' => 1,
    		'site_id' => 1
    	],
    	[
    		'id' => 3,
    		'designation' => 'Test 3',
    		'sur_categorie_id' => 1,
    		'categorie_id' => 1,
    		'sous_categorie_id' => 1,
    		'numero_laboratoire' => 'TEST-2016-0003',
    		'description' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
    		'materiel_administratif' => 1,
    		'materiel_technique' => 1,
    		'status' => 'VALIDATED',
    		'date_acquisition' => '2016-05-11',
    		'fournisseur' => 'Lorem ipsum dolor sit amet',
    		'prix_ht' => 75,
    		'eotp' => 'Lorem ipsum dolor sit amet',
    		'numero_commande' => 'Lorem ipsum dolor sit amet',
    		'code_comptable' => 'Lorem ipsum dolor sit amet',
    		'numero_serie' => 'Lorem ipsum dolor sit amet',
    		'groupes_thematique_id' => 1,
    		'groupes_metier_id' => 1,
    		'numero_inventaire_organisme' => 'Lorem ipsum dolor sit amet',
    		'numero_inventaire_old' => 'Lorem ipsum dolor sit amet',
    		'date_archivage' => '2016-04-19',
    		'etiquette' => 1,
    		'lieu_detail' => 'Lorem ipsum dolor sit amet',
    		'nom_responsable' => 'Lorem ipsum dolor sit amet',
    		'email_responsable' => 'Lorem ipsum dolor sit amet',
    		'nom_createur' => 'Lorem ipsum dolor sit amet',
    		'nom_modificateur' => 'Lorem ipsum dolor sit amet',
    		'created' => '2016-04-19 09:09:29',
    		'modified' => '2016-04-19 09:09:29',
    		'date_reception' => '2016-04-19',
    		'organisme_id' => 1,
    		'site_id' => 1
    	],
    		[
    		'id' => 11,
    		'designation' => 'Test 11',
    		'sur_categorie_id' => 1,
    		'categorie_id' => 1,
    		'sous_categorie_id' => 1,
    		'numero_laboratoire' => 'TEST-2016-0011',
    		'description' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
    		'materiel_administratif' => 1,
    		'materiel_technique' => 1,
    		'status' => 'CREATED',
    		'date_acquisition' => '2016-05-11',
    		'fournisseur' => 'Lorem ipsum dolor sit amet',
    		'prix_ht' => 75,
    		'eotp' => 'Lorem ipsum dolor sit amet',
    		'numero_commande' => 'Lorem ipsum dolor sit amet',
    		'code_comptable' => 'Lorem ipsum dolor sit amet',
    		'numero_serie' => 'Lorem ipsum dolor sit amet',
    		'groupes_thematique_id' => 1,
    		'groupes_metier_id' => 1,
    		'numero_inventaire_organisme' => 'Lorem ipsum dolor sit amet',
    		'numero_inventaire_old' => 'Lorem ipsum dolor sit amet',
    		'date_archivage' => '2016-04-19',
    		'etiquette' => 0,
    		'lieu_detail' => 'Lorem ipsum dolor sit amet',
    		'nom_responsable' => 'test9 test0',
    		'email_responsable' => 'Lorem ipsum dolor sit amet',
    		'nom_createur' => 'test9 test0',
    		'nom_modificateur' => 'Lorem ipsum dolor sit amet',
    		'created' => '2016-04-19 09:09:29',
    		'modified' => '2016-04-19 09:09:29',
    		'date_reception' => '2016-04-19',
    		'organisme_id' => 1,
    		'site_id' => 1
    		],
    		[
    		'id' => 12,
    		'designation' => 'Test 12',
    		'sur_categorie_id' => 1,
    		'categorie_id' => 1,
    		'sous_categorie_id' => 1,
    		'numero_laboratoire' => 'TEST-2016-0012',
    		'description' => 'Lorem ipsum dolor sit amet, aliquet feugiat. Convallis morbi fringilla gravida, phasellus feugiat dapibus velit nunc, pulvinar eget sollicitudin venenatis cum nullam, vivamus ut a sed, mollitia lectus. Nulla vestibulum massa neque ut et, id hendrerit sit, feugiat in taciti enim proin nibh, tempor dignissim, rhoncus duis vestibulum nunc mattis convallis.',
    		'materiel_administratif' => 1,
    		'materiel_technique' => 1,
    		'status' => 'VALIDATED',
    		'date_acquisition' => '2016-05-11',
    		'fournisseur' => 'Lorem ipsum dolor sit amet',
    		'prix_ht' => 75,
    		'eotp' => 'Lorem ipsum dolor sit amet',
    		'numero_commande' => 'Lorem ipsum dolor sit amet',
    		'code_comptable' => 'Lorem ipsum dolor sit amet',
    		'numero_serie' => 'Lorem ipsum dolor sit amet',
    		'groupes_thematique_id' => 1,
    		'groupes_metier_id' => 1,
    		'numero_inventaire_organisme' => 'Lorem ipsum dolor sit amet',
    		'numero_inventaire_old' => 'Lorem ipsum dolor sit amet',
    		'date_archivage' => '2016-04-19',
    		'etiquette' => 1,
    		'lieu_detail' => 'Lorem ipsum dolor sit amet',
    		'nom_responsable' => 'Lorem ipsum dolor sit amet',
    		'email_responsable' => 'Lorem ipsum dolor sit amet',
    		'nom_createur' => 'Lorem ipsum dolor sit amet',
    		'nom_modificateur' => 'Lorem ipsum dolor sit amet',
    		'created' => '2016-04-19 09:09:29',
    		'modified' => '2016-04-19 09:09:29',
    		'date_reception' => '2016-04-19',
    		'organisme_id' => 1,
    		'site_id' => 1
    		],
    		[
    		'id' => 13,
    		'designation' => 'Test 13',
    		'sur_categorie_id' => 1,
    		'categorie_id' => 1,
    		'sous_categorie_id' => 1,
    		'numero_laboratoire' => 'TEST-2016-0013',
    		'description' => 'TEST COPIE MATERIEL',
    		'materiel_administratif' => 1,
    		'materiel_technique' => 1,
    		'status' => 'TOBEARCHIVED',
    		'date_acquisition' => '2016-05-11',
    		'fournisseur' => 'Lorem ipsum dolor sit amet',
    		'prix_ht' => 75,
    		'eotp' => 'Lorem ipsum dolor sit amet',
    		'numero_commande' => 'Lorem ipsum dolor sit amet',
    		'code_comptable' => 'Lorem ipsum dolor sit amet',
    		'numero_serie' => 'Lorem ipsum dolor sit amet',
    		'groupes_thematique_id' => 1,
    		'groupes_metier_id' => 1,
    		'numero_inventaire_organisme' => 'Lorem ipsum dolor sit amet',
    		'numero_inventaire_old' => 'Lorem ipsum dolor sit amet',
    		'date_archivage' => '2016-04-19',
    		'etiquette' => 1,
    		'lieu_detail' => 'Lorem ipsum dolor sit amet',
    		'nom_responsable' => 'Jesus',
    		'email_responsable' => 'Lorem ipsum dolor sit amet',
    		'nom_createur' => 'Lorem ipsum dolor sit amet',
    		'nom_modificateur' => 'Lorem ipsum dolor sit amet',
    		'created' => '2016-04-19 09:09:29',
    		'modified' => '2016-04-19 09:09:29',
    		'date_reception' => '2016-04-19',
    		'organisme_id' => 1,
    		'site_id' => 1
    		],
    		[
    		'id' => 14,
    		'designation' => 'Test 14',
    		'sur_categorie_id' => 1,
    		'categorie_id' => 1,
    		'sous_categorie_id' => 1,
    		'numero_laboratoire' => 'TEST-2016-0014',
    		'description' => 'blabla',
    		'materiel_administratif' => 1,
    		'materiel_technique' => 1,
    		'status' => 'ARCHIVED',
    		'date_acquisition' => '2016-05-11',
    		'fournisseur' => 'Lorem ipsum dolor sit amet',
    		'prix_ht' => 75,
    		'eotp' => 'Lorem ipsum dolor sit amet',
    		'numero_commande' => 'Lorem ipsum dolor sit amet',
    		'code_comptable' => 'Lorem ipsum dolor sit amet',
    		'numero_serie' => 'Lorem ipsum dolor sit amet',
    		'groupes_thematique_id' => 1,
    		'groupes_metier_id' => 1,
    		'numero_inventaire_organisme' => 'Lorem ipsum dolor sit amet',
    		'numero_inventaire_old' => 'Lorem ipsum dolor sit amet',
    		'date_archivage' => '2016-04-19',
    		'etiquette' => 1,
    		'lieu_detail' => 'Lorem ipsum dolor sit amet',
    		'nom_responsable' => 'Jesus',
    		'email_responsable' => 'Lorem ipsum dolor sit amet',
    		'nom_createur' => 'Lorem ipsum dolor sit amet',
    		'nom_modificateur' => 'Lorem ipsum dolor sit amet',
    		'created' => '2016-04-19 09:09:29',
    		'modified' => '2016-04-19 09:09:29',
    		'date_reception' => '2016-04-19',
    		'organisme_id' => 1,
    		'site_id' => 1
    		]
    ];
}