<?php
namespace App\Amadeus\FileParser;

class Line_MFD extends \App\Amadeus\FileParser\LineAbstract
{
	/**
	 * 4.136. MFD MCO/EMD Fare Discount Element
	 * see page 340(382)
	 *
	 * DETAILS
	 */
	protected $structure = [
		['name'=> 'MSGTAG',  'val' => 'MFD',   'type' => 'AN',      'req' => 'M',  'len' => 3,],                          // 1 : Message Tag (MFD)
		['name'=> 'MISC',                      'type' => 'AN',      'req' => 'M',  'len_min' => 1,   'len_max' => 127,],  // 2 : Fare Discount Element Information
		['name'=> 'LINEASS', 'val' => ';L',    'type' => 'ASSOC',],
		['name'=> 'PSGASS',  'val' => ';P',    'type' => 'ASSOC',],
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',      'req' => 'M',  'len' => 1,],                          // 4 : Delimiter (Constant value of ';')
		['name'=> 'TSMID',   'val' => 'D',     'type' => 'AN',                     'len' => 2,],                          // 5 : TSM association identifier (constant value of 'D')
		['name'=> 'TSMNBR',                    'type' => 'N',       'req' => 'M',  'requires' => ['TSMID',],],     // 6 : TSM number
	];
}
