'privatesales_logistique_export', 'primary' => 'id_privatesales_export', 'fields' => array( 'id_sale' => array('type' => self::TYPE_INT, 'validate' => 'isInt'), 'status' => array('type' => self::TYPE_STRING, 'validate' => 'isString'), 'from' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'to' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate'), ) ); public function __construct($id = null, $id_lang = null, $id_shop = null) { parent::__construct($id, $id_lang, $id_shop); } public static function getDir($root = true) { if($root === true) return _PS_MODULE_DIR_.'privatesales_tools/files/bdc/'; else return Context::getContext()->shop->getBaseUrl().'modules/privatesales_tools/files/bdc/'; } public static function getFileStatic($id_privatesales_export, $root) { return self::getDir($root).$id_privatesales_export.'.xlsx'; } public function getFile($root = true) { return self::getFileStatic($this->id, $root); } } ?>