<?php

$zeroVolume = json_encode(['f' => '0', 'n' => '0', 'n2' => '0']);
$defaultPrice = json_encode(['f' => '4000', 'n' => '4000', 'n2' => '4000']);
$defaultMain = json_encode(['f' => '1', 'n' => '1', 'n2' => '1']);
$defaultMaxVolume = json_encode(['f' => '1000', 'n' => '1000', 'n2' => '1000']);
$defaultMaxTime = json_encode(['f' => '365', 'n' => '365', 'n2' => '365']);
$textbotlang = $schema->context('textbotlang');

return [
    'create' => <<<SQL
        id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
        code_panel varchar(200) NULL,
        name_panel varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
        status varchar(500) NULL,
        url_panel varchar(2000) NULL,
        username_panel varchar(200) NULL,
        password_panel TEXT NULL,
        agent varchar(200) NULL,
        sublink varchar(500) NULL,
        config varchar(500) NULL,
        MethodUsername varchar(700) NULL,
        TestAccount varchar(100) NULL,
        limit_panel varchar(100) NULL,
        namecustom varchar(100) NULL,
        Methodextend varchar(100) NULL,
        conecton varchar(100) NULL,
        linksubx varchar(1000) NULL,
        inboundid varchar(100) NULL,
        type varchar(100) NULL,
        inboundstatus varchar(100) NULL,
        inbound_deactive varchar(100) NULL,
        time_usertest varchar(100) NULL,
        val_usertest varchar(100) NULL,
        secret_code varchar(200) NULL,
        priceChangeloc varchar(200) NULL,
        priceextravolume varchar(500) NULL,
        pricecustomvolume varchar(500) NULL,
        pricecustomtime varchar(500) NULL,
        priceextratime varchar(500) NULL,
        mainvolume varchar(500) NULL,
        maxvolume varchar(500) NULL,
        maintime varchar(500) NULL,
        maxtime varchar(500) NULL,
        status_extend varchar(100) NULL,
        datelogin TEXT NULL,
        proxies TEXT NULL,
        inbounds TEXT NULL,
        subvip varchar(60) NULL,
        changeloc varchar(60) NULL,
        on_hold_test varchar(60) NOT NULL,
        version_panel varchar(60) NOT NULL,
        customvolume TEXT NULL,
        hide_user TEXT NULL
        SQL,
    'columns' => [
        ['code_panel', null, 'VARCHAR(50)'],
        ['status', 'active', 'VARCHAR(50)'],
        ['agent', 'all', 'VARCHAR(50)'],
        ['sublink', 'onsublink', 'VARCHAR(50)'],
        ['config', 'offconfig', 'VARCHAR(50)'],
        ['MethodUsername', $textbotlang['keyboard']['numericIdRandom'], 'VARCHAR(100)'],
        ['TestAccount', 'ONTestAccount', 'VARCHAR(50)'],
        ['limit_panel', 'unlimted', 'VARCHAR(50)'],
        ['namecustom', 'vpn', 'VARCHAR(100)'],
        ['Methodextend', 'resetVolumeTime', 'VARCHAR(100)'],
        ['conecton', 'offconecton', 'VARCHAR(100)'],
        ['linksubx', null, 'VARCHAR(200)'],
        ['inboundid', '1', 'VARCHAR(50)'],
        ['type', 'marzban', 'VARCHAR(50)'],
        ['inboundstatus', 'offinbounddisable', 'VARCHAR(50)'],
        ['inbound_deactive', '0', 'VARCHAR(100)'],
        ['time_usertest', '1', 'VARCHAR(50)'],
        ['val_usertest', '100', 'VARCHAR(50)'],
        ['secret_code', null, 'VARCHAR(200)'],
        ['priceChangeloc', '0', 'VARCHAR(100)'],
        ['priceextravolume', $defaultPrice, 'VARCHAR(500)'],
        ['pricecustomvolume', $defaultPrice, 'VARCHAR(500)'],
        ['pricecustomtime', $defaultPrice, 'VARCHAR(500)'],
        ['priceextratime', $defaultPrice, 'VARCHAR(500)'],
        ['mainvolume', $defaultMain, 'VARCHAR(500)'],
        ['maxvolume', $defaultMaxVolume, 'VARCHAR(500)'],
        ['maintime', $defaultMain, 'VARCHAR(500)'],
        ['maxtime', $defaultMaxTime, 'VARCHAR(500)'],
        ['status_extend', 'on_extend', 'VARCHAR(50)'],
        ['datelogin', null, 'TEXT'],
        ['proxies', null, 'TEXT'],
        ['inbounds', null, 'TEXT'],
        ['subvip', 'offsubvip', 'VARCHAR(60)'],
        ['changeloc', 'offchangeloc', 'VARCHAR(60)'],
        ['on_hold_test', '1', 'VARCHAR(60)'],
        ['version_panel', '0', 'VARCHAR(60)'],
        ['customvolume', $zeroVolume, 'TEXT'],
        ['hide_user', null, 'TEXT'],
    ],
];
