<?php

use Illuminate\Database\Seeder;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;

class PageTableSeeder extends Seeder
{
    private $tableName;

    public function __construct()
    {
        $this->tableName = 'printer_templates';
    }

    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
       

        $Permissionitems = [
            [
                'id' => 1,                                
                'name' => 'Invoice1',
                'page_size' => 'A4',
                'lmargin' => 0,
                'rmargin' => 0,
                'tmargin' => 0,
                'bmargin' => 0,
                'lpad' => 0,
                'rpad' => 0,
                'tpad' => 0,
                'bpad' => 0,
                'color_mode' => 'color',
                'page_length' => 297,
                'page_width' =>  210,
                'duplex_mode' => 0,
                'orientation' => 'P',
                'logo_path' => '',
                'watermark_path' => ''                           
            ],
            [
                'id' => 2,                                
                'name' => 'Invoice2',
                'page_size' => 'A5',
                'lmargin' => 0,
                'rmargin' => 0,
                'tmargin' => 0,
                'bmargin' => 0,
                'lpad' => 0,
                'rpad' => 0,
                'tpad' => 0,
                'bpad' => 0,
                'color_mode' => 'color',
                'page_length' => 148,
                'page_width' =>  210,
                'duplex_mode' => 1,
                'orientation' => 'P' ,
                'logo_path' => '',
                'watermark_path' => ''                             
            ],
            [
                'id' => 3,                                
                'name' => 'ProdReport',
                'page_size' => 'A4',
                'lmargin' => 0,
                'rmargin' => 0,
                'tmargin' => 0,
                'bmargin' => 0,
                'lpad' => 0,
                'rpad' => 0,
                'tpad' => 0,
                'bpad' => 0,
                'color_mode' => 'color',
                'page_length' => 148,
                'page_width' =>  210,
                'duplex_mode' => 1,
                'orientation' => 'P'  ,
                'logo_path' => '',
                'watermark_path' => ''                            
            ]
            
        ];

        foreach ($Permissionitems as $item) {
            DB::table($this->tableName)->insert($item);
        }
        

        
    }
}
