@ecopex/ecopex-framework 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -0
- package/libraries/fastify.js +126 -0
- package/package.json +6 -2
- package/.env +0 -73
- package/database/migrations/20240000135243_timezones.js +0 -22
- package/database/migrations/20240000135244_countries.js +0 -23
- package/database/migrations/20240000135244_create_admins_table.js +0 -66
- package/database/migrations/20240000135244_currencies.js +0 -21
- package/database/migrations/20240000135244_languages.js +0 -21
- package/database/migrations/20240000135244_taxes.js +0 -10
- package/database/migrations/20240000135245_sites.js +0 -37
- package/database/migrations/20240000135246_payment_methods.js +0 -33
- package/database/migrations/20251016113547_devices.js +0 -37
- package/database/migrations/20251019192600_users.js +0 -62
- package/database/migrations/20251019213551_language_lines.js +0 -35
- package/database/migrations/20251222214131_category_groups.js +0 -18
- package/database/migrations/20251222214619_categories.js +0 -27
- package/database/migrations/20251222214848_brands.js +0 -23
- package/database/migrations/20251222214946_products.js +0 -30
- package/database/migrations/20251222215428_product_images.js +0 -18
- package/database/migrations/20251222215553_options.js +0 -30
- package/database/migrations/20251222215806_variants.js +0 -23
- package/database/migrations/20251222215940_attributes.js +0 -25
- package/database/migrations/20251222220135_discounts.js +0 -15
- package/database/migrations/20251222220253_reviews.js +0 -22
- package/database/migrations/20251222220341_favorites.js +0 -10
- package/database/migrations/20251222220422_search_logs.js +0 -17
- package/database/migrations/20251222220636_orders.js +0 -16
- package/database/migrations/20251222220806_order_items.js +0 -19
- package/database/migrations/20251222221317_order_statuses.js +0 -10
- package/database/migrations/20251222221446_order_payments.js +0 -13
- package/database/migrations/20251222221654_order_addresses.js +0 -23
- package/database/migrations/20251222221807_order_status_logs.js +0 -13
- package/database/seeds/admins.js +0 -37
- package/database/seeds/countries.js +0 -203
- package/database/seeds/currencies.js +0 -165
- package/database/seeds/languages.js +0 -113
- package/database/seeds/timezones.js +0 -149
- package/ecosystem.config.js +0 -26
- package/routes/admin/auto/admins.json +0 -63
- package/routes/admin/auto/devices.json +0 -37
- package/routes/admin/auto/migrations.json +0 -21
- package/routes/admin/auto/users.json +0 -61
- package/routes/admin/middlewares/index.js +0 -87
- package/routes/admin/spec/auth.js +0 -626
- package/routes/admin/spec/users.js +0 -3
- package/routes/auto/handler.js +0 -635
- package/routes/common/auto/countries.json +0 -28
- package/routes/common/auto/currencies.json +0 -26
- package/routes/common/auto/languages.json +0 -26
- package/routes/common/auto/taxes.json +0 -46
- package/routes/common/auto/timezones.json +0 -29
- package/workers/admin.js +0 -124
- package/workers/api.js +0 -106
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema
|
|
3
|
-
.createTable('brands', table => {
|
|
4
|
-
table.increments('brand_id').primary();
|
|
5
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
6
|
-
table.boolean('is_active').defaultTo(true);
|
|
7
|
-
table.string('image').nullable();
|
|
8
|
-
table.string('icon').nullable();
|
|
9
|
-
table.string('color', 7).nullable();
|
|
10
|
-
table.timestamps(true, true);
|
|
11
|
-
})
|
|
12
|
-
.createTable('brand_translations', table => {
|
|
13
|
-
table.increments('brand_translation_id').primary();
|
|
14
|
-
table.integer('brand_id').unsigned().references('brand_id').inTable('brands').onDelete('CASCADE');
|
|
15
|
-
table.integer('language_id').unsigned().references('language_id').inTable('languages');
|
|
16
|
-
table.string('name').notNullable();
|
|
17
|
-
table.string('slug').notNullable();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
exports.down = knex =>
|
|
21
|
-
knex.schema
|
|
22
|
-
.dropTable('brand_translations')
|
|
23
|
-
.dropTable('brands');
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema
|
|
3
|
-
.createTable('products', table => {
|
|
4
|
-
table.increments('product_id').primary();
|
|
5
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
6
|
-
table.integer('brand_id').unsigned().references('brand_id').inTable('brands');
|
|
7
|
-
table.integer('category_id').unsigned().references('category_id').inTable('categories');
|
|
8
|
-
table.integer('currency_id').unsigned().references('currency_id').inTable('currencies');
|
|
9
|
-
table.integer('country_id').unsigned().references('country_id').inTable('countries');
|
|
10
|
-
table.integer('tax_id').unsigned().references('tax_id').inTable('taxes');
|
|
11
|
-
table.enum('product_type', ['physical', 'digital', 'service', 'third_party']).notNullable();
|
|
12
|
-
table.boolean('is_active').defaultTo(true);
|
|
13
|
-
table.timestamps(true, true);
|
|
14
|
-
})
|
|
15
|
-
.createTable('product_translations', table => {
|
|
16
|
-
table.increments('product_translation_id').primary();
|
|
17
|
-
table.integer('product_id').unsigned().references('product_id').inTable('products').onDelete('CASCADE');
|
|
18
|
-
table.integer('language_id').unsigned().references('language_id').inTable('languages');
|
|
19
|
-
table.string('title').notNullable();
|
|
20
|
-
table.text('description');
|
|
21
|
-
table.string('slug').notNullable();
|
|
22
|
-
table.index(['title'], 'product_title_index', {
|
|
23
|
-
type: 'fulltext'
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
exports.down = knex =>
|
|
28
|
-
knex.schema
|
|
29
|
-
.dropTable('product_translations')
|
|
30
|
-
.dropTable('products');
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema.createTable('product_images', table => {
|
|
3
|
-
table.increments('product_image_id').primary();
|
|
4
|
-
table.integer('product_id').unsigned().references('product_id').inTable('products').onDelete('CASCADE');
|
|
5
|
-
table.string('image_url').notNullable();
|
|
6
|
-
table.boolean('is_main').defaultTo(false);
|
|
7
|
-
table.integer('order').defaultTo(0);
|
|
8
|
-
table.boolean('is_active').defaultTo(true);
|
|
9
|
-
table.timestamps(true, true);
|
|
10
|
-
table.index(['product_id'], 'product_image_product_index');
|
|
11
|
-
table.index(['is_main'], 'product_image_is_main_index');
|
|
12
|
-
table.index(['order'], 'product_image_order_index');
|
|
13
|
-
table.index(['created_at'], 'product_image_created_at_index');
|
|
14
|
-
table.index(['updated_at'], 'product_image_updated_at_index');
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
exports.down = knex =>
|
|
18
|
-
knex.schema.dropTable('product_images');
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema
|
|
3
|
-
.createTable('option_types', table => {
|
|
4
|
-
table.increments('option_type_id').primary();
|
|
5
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
6
|
-
table.string('code').unique();
|
|
7
|
-
})
|
|
8
|
-
.createTable('option_type_translations', table => {
|
|
9
|
-
table.increments('option_type_translation_id').primary();
|
|
10
|
-
table.integer('option_type_id').unsigned().references('option_type_id').inTable('option_types').onDelete('CASCADE');
|
|
11
|
-
table.integer('language_id').unsigned().references('language_id').inTable('languages');
|
|
12
|
-
table.string('name').notNullable();
|
|
13
|
-
})
|
|
14
|
-
.createTable('option_values', table => {
|
|
15
|
-
table.increments('option_value_id').primary();
|
|
16
|
-
table.integer('option_type_id').unsigned().references('option_type_id').inTable('option_types').onDelete('CASCADE');
|
|
17
|
-
})
|
|
18
|
-
.createTable('option_value_translations', table => {
|
|
19
|
-
table.increments('option_value_translation_id').primary();
|
|
20
|
-
table.integer('option_value_id').unsigned().references('option_value_id').inTable('option_values').onDelete('CASCADE');
|
|
21
|
-
table.integer('language_id').unsigned().references('language_id').inTable('languages');
|
|
22
|
-
table.string('value').notNullable();
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
exports.down = knex =>
|
|
26
|
-
knex.schema
|
|
27
|
-
.dropTable('option_value_translations')
|
|
28
|
-
.dropTable('option_values')
|
|
29
|
-
.dropTable('option_type_translations')
|
|
30
|
-
.dropTable('option_types');
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema
|
|
3
|
-
.createTable('product_variants', table => {
|
|
4
|
-
table.increments('product_variant_id').primary();
|
|
5
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
6
|
-
table.integer('product_id').unsigned().references('product_id').inTable('products').onDelete('CASCADE');
|
|
7
|
-
table.string('sku').unique();
|
|
8
|
-
table.decimal('price', 10, 2);
|
|
9
|
-
table.decimal('discount_price', 10, 2);
|
|
10
|
-
table.integer('stock').defaultTo(0);
|
|
11
|
-
})
|
|
12
|
-
.createTable('product_variant_options', table => {
|
|
13
|
-
table.increments('product_variant_option_id').primary();
|
|
14
|
-
table.integer('product_variant_id').unsigned().references('product_variant_id').inTable('product_variants').onDelete('CASCADE');
|
|
15
|
-
table.integer('option_value_id').unsigned().references('option_value_id').inTable('option_values').onDelete('CASCADE');
|
|
16
|
-
table.integer('option_type_id').unsigned().references('option_type_id').inTable('option_types').onDelete('CASCADE');
|
|
17
|
-
table.decimal('variant_price', 16, 2).defaultTo(0);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
exports.down = knex =>
|
|
21
|
-
knex.schema
|
|
22
|
-
.dropTable('product_variant_options')
|
|
23
|
-
.dropTable('product_variants');
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema
|
|
3
|
-
.createTable('attributes', table => {
|
|
4
|
-
table.increments('attribute_id').primary();
|
|
5
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
6
|
-
table.integer('category_id').unsigned().references('category_id').inTable('categories').onDelete('CASCADE');
|
|
7
|
-
})
|
|
8
|
-
.createTable('attribute_translations', table => {
|
|
9
|
-
table.increments('attribute_translation_id').primary();
|
|
10
|
-
table.integer('attribute_id').unsigned().references('attribute_id').inTable('attributes').onDelete('CASCADE');
|
|
11
|
-
table.integer('language_id').unsigned().references('language_id').inTable('languages');
|
|
12
|
-
table.string('name').notNullable();
|
|
13
|
-
})
|
|
14
|
-
.createTable('product_attributes', table => {
|
|
15
|
-
table.increments('product_attribute_id').primary();
|
|
16
|
-
table.integer('product_id').unsigned().references('product_id').inTable('products').onDelete('CASCADE');
|
|
17
|
-
table.integer('attribute_id').unsigned().references('attribute_id').inTable('attributes').onDelete('CASCADE');
|
|
18
|
-
table.string('value').notNullable();
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
exports.down = knex =>
|
|
22
|
-
knex.schema
|
|
23
|
-
.dropTable('product_attributes')
|
|
24
|
-
.dropTable('attribute_translations')
|
|
25
|
-
.dropTable('attributes');
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema.createTable('discounts', table => {
|
|
3
|
-
table.increments('discount_id').primary();
|
|
4
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
5
|
-
table.enum('type', ['global', 'category']);
|
|
6
|
-
table.integer('brand_id').unsigned().nullable().references('brand_id').inTable('brands');
|
|
7
|
-
table.integer('category_id').unsigned().nullable().references('category_id').inTable('categories');
|
|
8
|
-
table.decimal('percentage', 5, 2).defaultTo(0);
|
|
9
|
-
table.decimal('amount', 16, 2).defaultTo(0);
|
|
10
|
-
table.date('start_date');
|
|
11
|
-
table.date('end_date');
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
exports.down = knex =>
|
|
15
|
-
knex.schema.dropTable('discounts');
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema
|
|
3
|
-
.createTable('reviews', table => {
|
|
4
|
-
table.increments('review_id').primary();
|
|
5
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
6
|
-
table.integer('product_id').unsigned().references('product_id').inTable('products').onDelete('CASCADE');
|
|
7
|
-
table.integer('user_id').unsigned().references('user_id').inTable('users');
|
|
8
|
-
table.integer('rating').defaultTo(0);
|
|
9
|
-
table.text('comment');
|
|
10
|
-
table.boolean('is_approved').defaultTo(false);
|
|
11
|
-
table.timestamps(true, true);
|
|
12
|
-
})
|
|
13
|
-
.createTable('review_images', table => {
|
|
14
|
-
table.increments('review_image_id').primary();
|
|
15
|
-
table.integer('review_id').unsigned().references('review_id').inTable('reviews').onDelete('CASCADE');
|
|
16
|
-
table.string('image_url').notNullable();
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
exports.down = knex =>
|
|
20
|
-
knex.schema
|
|
21
|
-
.dropTable('review_images')
|
|
22
|
-
.dropTable('reviews');
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema.createTable('favorites', table => {
|
|
3
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
4
|
-
table.integer('user_id').unsigned().references('user_id').inTable('users').onDelete('CASCADE');
|
|
5
|
-
table.integer('product_id').unsigned().references('product_id').inTable('products').onDelete('CASCADE');
|
|
6
|
-
table.primary(['site_id', 'user_id', 'product_id']);
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
exports.down = knex =>
|
|
10
|
-
knex.schema.dropTable('favorites');
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema.createTable('search_logs', table => {
|
|
3
|
-
table.increments('search_log_id').primary();
|
|
4
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
5
|
-
table.integer('user_id').unsigned().references('user_id').inTable('users');
|
|
6
|
-
table.string('keyword').notNullable();
|
|
7
|
-
table.integer('search_count').defaultTo(1);
|
|
8
|
-
table.timestamp('last_searched_at').notNullable();
|
|
9
|
-
table.timestamps(true, true);
|
|
10
|
-
table.index(['site_id'], 'search_log_site_index');
|
|
11
|
-
table.index(['user_id'], 'search_log_user_index');
|
|
12
|
-
table.index(['keyword'], 'search_log_keyword_index');
|
|
13
|
-
table.index(['last_searched_at'], 'search_log_last_searched_at_index');
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
exports.down = knex =>
|
|
17
|
-
knex.schema.dropTable('search_logs');
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema.createTable('orders', table => {
|
|
3
|
-
table.increments('order_id').primary();
|
|
4
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
5
|
-
table.integer('user_id').nullable().unsigned().references('user_id').inTable('users');
|
|
6
|
-
table.string('order_number').unique().notNullable();
|
|
7
|
-
table.decimal('subtotal', 10, 2).notNullable();
|
|
8
|
-
table.decimal('discount_total', 10, 2).defaultTo(0);
|
|
9
|
-
table.decimal('shipping_total', 10, 2).defaultTo(0);
|
|
10
|
-
table.decimal('grand_total', 10, 2).notNullable();
|
|
11
|
-
|
|
12
|
-
table.timestamps(true, true);
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
exports.down = knex =>
|
|
16
|
-
knex.schema.dropTable('orders');
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema.createTable('order_items', table => {
|
|
3
|
-
table.increments('order_item_id').primary();
|
|
4
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
5
|
-
table.integer('order_id').unsigned().references('order_id').inTable('orders').onDelete('CASCADE');
|
|
6
|
-
table.integer('product_id').unsigned().nullable().references('product_id').inTable('products');
|
|
7
|
-
table.integer('product_variant_id').unsigned().nullable().references('product_variant_id').inTable('product_variants');
|
|
8
|
-
table.integer('currency_id').unsigned().nullable().references('currency_id').inTable('currencies');
|
|
9
|
-
table.integer('discount_id').unsigned().nullable().references('discount_id').inTable('discounts');
|
|
10
|
-
table.integer('tax_id').unsigned().nullable().references('tax_id').inTable('taxes');
|
|
11
|
-
table.decimal('unit_price', 10, 2).notNullable();
|
|
12
|
-
table.decimal('discount_price', 10, 2).nullable();
|
|
13
|
-
table.integer('quantity').notNullable();
|
|
14
|
-
table.decimal('total_price', 10, 2).notNullable();
|
|
15
|
-
table.timestamps(true, true);
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
exports.down = knex =>
|
|
19
|
-
knex.schema.dropTable('order_items');
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema.createTable('order_statuses', table => {
|
|
3
|
-
table.increments('order_status_id').primary();
|
|
4
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
5
|
-
table.string('code').unique().notNullable();
|
|
6
|
-
table.boolean('is_default').defaultTo(false);
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
exports.down = knex =>
|
|
10
|
-
knex.schema.dropTable('order_statuses');
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema.createTable('order_payments', table => {
|
|
3
|
-
table.increments('order_payment_id').primary();
|
|
4
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
5
|
-
table.integer('order_id').unsigned().references('order_id').inTable('orders').onDelete('CASCADE');
|
|
6
|
-
table.integer('order_status_id').unsigned().references('order_status_id').inTable('order_statuses');
|
|
7
|
-
table.integer('payment_method_id').unsigned().references('payment_method_id').inTable('payment_methods');
|
|
8
|
-
table.decimal('amount', 10, 2).notNullable();
|
|
9
|
-
table.timestamps(true, true);
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
exports.down = knex =>
|
|
13
|
-
knex.schema.dropTable('order_payments');
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema.createTable('order_addresses', table => {
|
|
3
|
-
table.increments('order_address_id').primary();
|
|
4
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
5
|
-
table.integer('order_id').unsigned().references('order_id').inTable('orders').onDelete('CASCADE');
|
|
6
|
-
table.enum('type', ['billing', 'shipping']).notNullable();
|
|
7
|
-
|
|
8
|
-
table.string('full_name');
|
|
9
|
-
table.string('phone');
|
|
10
|
-
table.string('country');
|
|
11
|
-
table.string('city');
|
|
12
|
-
table.string('district');
|
|
13
|
-
table.text('address');
|
|
14
|
-
table.string('postal_code');
|
|
15
|
-
|
|
16
|
-
table.string('tax_number');
|
|
17
|
-
table.string('tax_office');
|
|
18
|
-
|
|
19
|
-
table.timestamps(true, true);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
exports.down = knex =>
|
|
23
|
-
knex.schema.dropTable('order_addresses');
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
exports.up = knex =>
|
|
2
|
-
knex.schema.createTable('order_status_logs', table => {
|
|
3
|
-
table.increments('order_status_log_id').primary();
|
|
4
|
-
table.integer('site_id').unsigned().references('site_id').inTable('sites');
|
|
5
|
-
table.integer('order_id').unsigned().references('order_id').inTable('orders').onDelete('CASCADE');
|
|
6
|
-
table.integer('status_id').unsigned().references('order_status_id').inTable('order_statuses');
|
|
7
|
-
table.integer('changed_by').unsigned().nullable().references('admin_id').inTable('admins');
|
|
8
|
-
table.text('note');
|
|
9
|
-
table.timestamps(true, true);
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
exports.down = knex =>
|
|
13
|
-
knex.schema.dropTable('order_status_logs');
|
package/database/seeds/admins.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Seed the admins table with a default admin user.
|
|
3
|
-
* @param { import("knex").Knex } knex
|
|
4
|
-
*/
|
|
5
|
-
const bcrypt = require('bcryptjs');
|
|
6
|
-
|
|
7
|
-
exports.seed = async function(knex) {
|
|
8
|
-
// Hash the password using bcrypt
|
|
9
|
-
const hashedPassword = await bcrypt.hash('123123', 10);
|
|
10
|
-
|
|
11
|
-
// Inserts a default admin user
|
|
12
|
-
await knex('admins').insert([
|
|
13
|
-
{
|
|
14
|
-
firstname: 'Admin',
|
|
15
|
-
lastname: 'Admin',
|
|
16
|
-
username: 'admin',
|
|
17
|
-
email: 'admin@admin.com',
|
|
18
|
-
password: hashedPassword,
|
|
19
|
-
role: 'admin',
|
|
20
|
-
two_factor_enabled: true,
|
|
21
|
-
two_factor_secret: 'WZVMTNVU4JZAXHAKSYJIKN7S2IRAZSS5',
|
|
22
|
-
is_active: true
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
firstname: 'Support',
|
|
26
|
-
lastname: 'Support',
|
|
27
|
-
username: 'support',
|
|
28
|
-
email: 'support@support.com',
|
|
29
|
-
password: hashedPassword,
|
|
30
|
-
role: 'support',
|
|
31
|
-
two_factor_enabled: true,
|
|
32
|
-
two_factor_secret: 'WZVMTNVU4JZAXHAKSYJIKN7S2IRAZSS5',
|
|
33
|
-
is_active: true
|
|
34
|
-
}
|
|
35
|
-
]).onConflict('username').merge();
|
|
36
|
-
};
|
|
37
|
-
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Seed the countries table with all countries.
|
|
3
|
-
* @param { import("knex").Knex } knex
|
|
4
|
-
*/
|
|
5
|
-
exports.seed = async function(knex) {
|
|
6
|
-
await knex('countries').insert([
|
|
7
|
-
{ country_id: 1, name: 'Afghanistan', code: 'AF', iso_code: 'AFG', phone_code: '+93', flag: '🇦🇫' },
|
|
8
|
-
{ country_id: 2, name: 'Albania', code: 'AL', iso_code: 'ALB', phone_code: '+355', flag: '🇦🇱' },
|
|
9
|
-
{ country_id: 3, name: 'Algeria', code: 'DZ', iso_code: 'DZA', phone_code: '+213', flag: '🇩🇿' },
|
|
10
|
-
{ country_id: 4, name: 'Andorra', code: 'AD', iso_code: 'AND', phone_code: '+376', flag: '🇦🇩' },
|
|
11
|
-
{ country_id: 5, name: 'Angola', code: 'AO', iso_code: 'AGO', phone_code: '+244', flag: '🇦🇴' },
|
|
12
|
-
{ country_id: 6, name: 'Antigua and Barbuda', code: 'AG', iso_code: 'ATG', phone_code: '+1268', flag: '🇦🇬' },
|
|
13
|
-
{ country_id: 7, name: 'Argentina', code: 'AR', iso_code: 'ARG', phone_code: '+54', flag: '🇦🇷' },
|
|
14
|
-
{ country_id: 8, name: 'Armenia', code: 'AM', iso_code: 'ARM', phone_code: '+374', flag: '🇦🇲' },
|
|
15
|
-
{ country_id: 9, name: 'Australia', code: 'AU', iso_code: 'AUS', phone_code: '+61', flag: '🇦🇺' },
|
|
16
|
-
{ country_id: 10, name: 'Austria', code: 'AT', iso_code: 'AUT', phone_code: '+43', flag: '🇦🇹' },
|
|
17
|
-
{ country_id: 11, name: 'Azerbaijan', code: 'AZ', iso_code: 'AZE', phone_code: '+994', flag: '🇦🇿' },
|
|
18
|
-
{ country_id: 12, name: 'Bahamas', code: 'BS', iso_code: 'BHS', phone_code: '+1242', flag: '🇧🇸' },
|
|
19
|
-
{ country_id: 13, name: 'Bahrain', code: 'BH', iso_code: 'BHR', phone_code: '+973', flag: '🇧🇭' },
|
|
20
|
-
{ country_id: 14, name: 'Bangladesh', code: 'BD', iso_code: 'BGD', phone_code: '+880', flag: '🇧🇩' },
|
|
21
|
-
{ country_id: 15, name: 'Barbados', code: 'BB', iso_code: 'BRB', phone_code: '+1246', flag: '🇧🇧' },
|
|
22
|
-
{ country_id: 16, name: 'Belarus', code: 'BY', iso_code: 'BLR', phone_code: '+375', flag: '🇧🇾' },
|
|
23
|
-
{ country_id: 17, name: 'Belgium', code: 'BE', iso_code: 'BEL', phone_code: '+32', flag: '🇧🇪' },
|
|
24
|
-
{ country_id: 18, name: 'Belize', code: 'BZ', iso_code: 'BLZ', phone_code: '+501', flag: '🇧🇿' },
|
|
25
|
-
{ country_id: 19, name: 'Benin', code: 'BJ', iso_code: 'BEN', phone_code: '+229', flag: '🇧🇯' },
|
|
26
|
-
{ country_id: 20, name: 'Bhutan', code: 'BT', iso_code: 'BTN', phone_code: '+975', flag: '🇧🇹' },
|
|
27
|
-
{ country_id: 21, name: 'Bolivia', code: 'BO', iso_code: 'BOL', phone_code: '+591', flag: '🇧🇴' },
|
|
28
|
-
{ country_id: 22, name: 'Bosnia and Herzegovina', code: 'BA', iso_code: 'BIH', phone_code: '+387', flag: '🇧🇦' },
|
|
29
|
-
{ country_id: 23, name: 'Botswana', code: 'BW', iso_code: 'BWA', phone_code: '+267', flag: '🇧🇼' },
|
|
30
|
-
{ country_id: 24, name: 'Brazil', code: 'BR', iso_code: 'BRA', phone_code: '+55', flag: '🇧🇷' },
|
|
31
|
-
{ country_id: 25, name: 'Brunei', code: 'BN', iso_code: 'BRN', phone_code: '+673', flag: '🇧🇳' },
|
|
32
|
-
{ country_id: 26, name: 'Bulgaria', code: 'BG', iso_code: 'BGR', phone_code: '+359', flag: '🇧🇬' },
|
|
33
|
-
{ country_id: 27, name: 'Burkina Faso', code: 'BF', iso_code: 'BFA', phone_code: '+226', flag: '🇧🇫' },
|
|
34
|
-
{ country_id: 28, name: 'Burundi', code: 'BI', iso_code: 'BDI', phone_code: '+257', flag: '🇧🇮' },
|
|
35
|
-
{ country_id: 29, name: 'Cambodia', code: 'KH', iso_code: 'KHM', phone_code: '+855', flag: '🇰🇭' },
|
|
36
|
-
{ country_id: 30, name: 'Cameroon', code: 'CM', iso_code: 'CMR', phone_code: '+237', flag: '🇨🇲' },
|
|
37
|
-
{ country_id: 31, name: 'Canada', code: 'CA', iso_code: 'CAN', phone_code: '+1', flag: '🇨🇦' },
|
|
38
|
-
{ country_id: 32, name: 'Cape Verde', code: 'CV', iso_code: 'CPV', phone_code: '+238', flag: '🇨🇻' },
|
|
39
|
-
{ country_id: 33, name: 'Central African Republic', code: 'CF', iso_code: 'CAF', phone_code: '+236', flag: '🇨🇫' },
|
|
40
|
-
{ country_id: 34, name: 'Chad', code: 'TD', iso_code: 'TCD', phone_code: '+235', flag: '🇹🇩' },
|
|
41
|
-
{ country_id: 35, name: 'Chile', code: 'CL', iso_code: 'CHL', phone_code: '+56', flag: '🇨🇱' },
|
|
42
|
-
{ country_id: 36, name: 'China', code: 'CN', iso_code: 'CHN', phone_code: '+86', flag: '🇨🇳' },
|
|
43
|
-
{ country_id: 37, name: 'Colombia', code: 'CO', iso_code: 'COL', phone_code: '+57', flag: '🇨🇴' },
|
|
44
|
-
{ country_id: 38, name: 'Comoros', code: 'KM', iso_code: 'COM', phone_code: '+269', flag: '🇰🇲' },
|
|
45
|
-
{ country_id: 39, name: 'Congo', code: 'CG', iso_code: 'COG', phone_code: '+242', flag: '🇨🇬' },
|
|
46
|
-
{ country_id: 40, name: 'Costa Rica', code: 'CR', iso_code: 'CRI', phone_code: '+506', flag: '🇨🇷' },
|
|
47
|
-
{ country_id: 41, name: 'Croatia', code: 'HR', iso_code: 'HRV', phone_code: '+385', flag: '🇭🇷' },
|
|
48
|
-
{ country_id: 42, name: 'Cuba', code: 'CU', iso_code: 'CUB', phone_code: '+53', flag: '🇨🇺' },
|
|
49
|
-
{ country_id: 43, name: 'Cyprus', code: 'CY', iso_code: 'CYP', phone_code: '+357', flag: '🇨🇾' },
|
|
50
|
-
{ country_id: 44, name: 'Czech Republic', code: 'CZ', iso_code: 'CZE', phone_code: '+420', flag: '🇨🇿' },
|
|
51
|
-
{ country_id: 45, name: 'Denmark', code: 'DK', iso_code: 'DNK', phone_code: '+45', flag: '🇩🇰' },
|
|
52
|
-
{ country_id: 46, name: 'Djibouti', code: 'DJ', iso_code: 'DJI', phone_code: '+253', flag: '🇩🇯' },
|
|
53
|
-
{ country_id: 47, name: 'Dominica', code: 'DM', iso_code: 'DMA', phone_code: '+1767', flag: '🇩🇲' },
|
|
54
|
-
{ country_id: 48, name: 'Dominican Republic', code: 'DO', iso_code: 'DOM', phone_code: '+1809', flag: '🇩🇴' },
|
|
55
|
-
{ country_id: 49, name: 'Ecuador', code: 'EC', iso_code: 'ECU', phone_code: '+593', flag: '🇪🇨' },
|
|
56
|
-
{ country_id: 50, name: 'Egypt', code: 'EG', iso_code: 'EGY', phone_code: '+20', flag: '🇪🇬' },
|
|
57
|
-
{ country_id: 51, name: 'El Salvador', code: 'SV', iso_code: 'SLV', phone_code: '+503', flag: '🇸🇻' },
|
|
58
|
-
{ country_id: 52, name: 'Equatorial Guinea', code: 'GQ', iso_code: 'GNQ', phone_code: '+240', flag: '🇬🇶' },
|
|
59
|
-
{ country_id: 53, name: 'Eritrea', code: 'ER', iso_code: 'ERI', phone_code: '+291', flag: '🇪🇷' },
|
|
60
|
-
{ country_id: 54, name: 'Estonia', code: 'EE', iso_code: 'EST', phone_code: '+372', flag: '🇪🇪' },
|
|
61
|
-
{ country_id: 55, name: 'Eswatini', code: 'SZ', iso_code: 'SWZ', phone_code: '+268', flag: '🇸🇿' },
|
|
62
|
-
{ country_id: 56, name: 'Ethiopia', code: 'ET', iso_code: 'ETH', phone_code: '+251', flag: '🇪🇹' },
|
|
63
|
-
{ country_id: 57, name: 'Fiji', code: 'FJ', iso_code: 'FJI', phone_code: '+679', flag: '🇫🇯' },
|
|
64
|
-
{ country_id: 58, name: 'Finland', code: 'FI', iso_code: 'FIN', phone_code: '+358', flag: '🇫🇮' },
|
|
65
|
-
{ country_id: 59, name: 'France', code: 'FR', iso_code: 'FRA', phone_code: '+33', flag: '🇫🇷' },
|
|
66
|
-
{ country_id: 60, name: 'Gabon', code: 'GA', iso_code: 'GAB', phone_code: '+241', flag: '🇬🇦' },
|
|
67
|
-
{ country_id: 61, name: 'Gambia', code: 'GM', iso_code: 'GMB', phone_code: '+220', flag: '🇬🇲' },
|
|
68
|
-
{ country_id: 62, name: 'Georgia', code: 'GE', iso_code: 'GEO', phone_code: '+995', flag: '🇬🇪' },
|
|
69
|
-
{ country_id: 63, name: 'Germany', code: 'DE', iso_code: 'DEU', phone_code: '+49', flag: '🇩🇪' },
|
|
70
|
-
{ country_id: 64, name: 'Ghana', code: 'GH', iso_code: 'GHA', phone_code: '+233', flag: '🇬🇭' },
|
|
71
|
-
{ country_id: 65, name: 'Greece', code: 'GR', iso_code: 'GRC', phone_code: '+30', flag: '🇬🇷' },
|
|
72
|
-
{ country_id: 66, name: 'Grenada', code: 'GD', iso_code: 'GRD', phone_code: '+1473', flag: '🇬🇩' },
|
|
73
|
-
{ country_id: 67, name: 'Guatemala', code: 'GT', iso_code: 'GTM', phone_code: '+502', flag: '🇬🇹' },
|
|
74
|
-
{ country_id: 68, name: 'Guinea', code: 'GN', iso_code: 'GIN', phone_code: '+224', flag: '🇬🇳' },
|
|
75
|
-
{ country_id: 69, name: 'Guinea-Bissau', code: 'GW', iso_code: 'GNB', phone_code: '+245', flag: '🇬🇼' },
|
|
76
|
-
{ country_id: 70, name: 'Guyana', code: 'GY', iso_code: 'GUY', phone_code: '+592', flag: '🇬🇾' },
|
|
77
|
-
{ country_id: 71, name: 'Haiti', code: 'HT', iso_code: 'HTI', phone_code: '+509', flag: '🇭🇹' },
|
|
78
|
-
{ country_id: 72, name: 'Honduras', code: 'HN', iso_code: 'HND', phone_code: '+504', flag: '🇭🇳' },
|
|
79
|
-
{ country_id: 73, name: 'Hungary', code: 'HU', iso_code: 'HUN', phone_code: '+36', flag: '🇭🇺' },
|
|
80
|
-
{ country_id: 74, name: 'Iceland', code: 'IS', iso_code: 'ISL', phone_code: '+354', flag: '🇮🇸' },
|
|
81
|
-
{ country_id: 75, name: 'India', code: 'IN', iso_code: 'IND', phone_code: '+91', flag: '🇮🇳' },
|
|
82
|
-
{ country_id: 76, name: 'Indonesia', code: 'ID', iso_code: 'IDN', phone_code: '+62', flag: '🇮🇩' },
|
|
83
|
-
{ country_id: 77, name: 'Iran', code: 'IR', iso_code: 'IRN', phone_code: '+98', flag: '🇮🇷' },
|
|
84
|
-
{ country_id: 78, name: 'Iraq', code: 'IQ', iso_code: 'IRQ', phone_code: '+964', flag: '🇮🇶' },
|
|
85
|
-
{ country_id: 79, name: 'Ireland', code: 'IE', iso_code: 'IRL', phone_code: '+353', flag: '🇮🇪' },
|
|
86
|
-
{ country_id: 80, name: 'Israel', code: 'IL', iso_code: 'ISR', phone_code: '+972', flag: '🇮🇱' },
|
|
87
|
-
{ country_id: 81, name: 'Italy', code: 'IT', iso_code: 'ITA', phone_code: '+39', flag: '🇮🇹' },
|
|
88
|
-
{ country_id: 82, name: 'Jamaica', code: 'JM', iso_code: 'JAM', phone_code: '+1876', flag: '🇯🇲' },
|
|
89
|
-
{ country_id: 83, name: 'Japan', code: 'JP', iso_code: 'JPN', phone_code: '+81', flag: '🇯🇵' },
|
|
90
|
-
{ country_id: 84, name: 'Jordan', code: 'JO', iso_code: 'JOR', phone_code: '+962', flag: '🇯🇴' },
|
|
91
|
-
{ country_id: 85, name: 'Kazakhstan', code: 'KZ', iso_code: 'KAZ', phone_code: '+7', flag: '🇰🇿' },
|
|
92
|
-
{ country_id: 86, name: 'Kenya', code: 'KE', iso_code: 'KEN', phone_code: '+254', flag: '🇰🇪' },
|
|
93
|
-
{ country_id: 87, name: 'Kiribati', code: 'KI', iso_code: 'KIR', phone_code: '+686', flag: '🇰🇮' },
|
|
94
|
-
{ country_id: 88, name: 'Kosovo', code: 'XK', iso_code: 'XKX', phone_code: '+383', flag: '🇽🇰' },
|
|
95
|
-
{ country_id: 89, name: 'Kuwait', code: 'KW', iso_code: 'KWT', phone_code: '+965', flag: '🇰🇼' },
|
|
96
|
-
{ country_id: 90, name: 'Kyrgyzstan', code: 'KG', iso_code: 'KGZ', phone_code: '+996', flag: '🇰🇬' },
|
|
97
|
-
{ country_id: 91, name: 'Laos', code: 'LA', iso_code: 'LAO', phone_code: '+856', flag: '🇱🇦' },
|
|
98
|
-
{ country_id: 92, name: 'Latvia', code: 'LV', iso_code: 'LVA', phone_code: '+371', flag: '🇱🇻' },
|
|
99
|
-
{ country_id: 93, name: 'Lebanon', code: 'LB', iso_code: 'LBN', phone_code: '+961', flag: '🇱🇧' },
|
|
100
|
-
{ country_id: 94, name: 'Lesotho', code: 'LS', iso_code: 'LSO', phone_code: '+266', flag: '🇱🇸' },
|
|
101
|
-
{ country_id: 95, name: 'Liberia', code: 'LR', iso_code: 'LBR', phone_code: '+231', flag: '🇱🇷' },
|
|
102
|
-
{ country_id: 96, name: 'Libya', code: 'LY', iso_code: 'LBY', phone_code: '+218', flag: '🇱🇾' },
|
|
103
|
-
{ country_id: 97, name: 'Liechtenstein', code: 'LI', iso_code: 'LIE', phone_code: '+423', flag: '🇱🇮' },
|
|
104
|
-
{ country_id: 98, name: 'Lithuania', code: 'LT', iso_code: 'LTU', phone_code: '+370', flag: '🇱🇹' },
|
|
105
|
-
{ country_id: 99, name: 'Luxembourg', code: 'LU', iso_code: 'LUX', phone_code: '+352', flag: '🇱🇺' },
|
|
106
|
-
{ country_id: 100, name: 'Madagascar', code: 'MG', iso_code: 'MDG', phone_code: '+261', flag: '🇲🇬' },
|
|
107
|
-
{ country_id: 101, name: 'Malawi', code: 'MW', iso_code: 'MWI', phone_code: '+265', flag: '🇲🇼' },
|
|
108
|
-
{ country_id: 102, name: 'Malaysia', code: 'MY', iso_code: 'MYS', phone_code: '+60', flag: '🇲🇾' },
|
|
109
|
-
{ country_id: 103, name: 'Maldives', code: 'MV', iso_code: 'MDV', phone_code: '+960', flag: '🇲🇻' },
|
|
110
|
-
{ country_id: 104, name: 'Mali', code: 'ML', iso_code: 'MLI', phone_code: '+223', flag: '🇲🇱' },
|
|
111
|
-
{ country_id: 105, name: 'Malta', code: 'MT', iso_code: 'MLT', phone_code: '+356', flag: '🇲🇹' },
|
|
112
|
-
{ country_id: 106, name: 'Marshall Islands', code: 'MH', iso_code: 'MHL', phone_code: '+692', flag: '🇲🇭' },
|
|
113
|
-
{ country_id: 107, name: 'Mauritania', code: 'MR', iso_code: 'MRT', phone_code: '+222', flag: '🇲🇷' },
|
|
114
|
-
{ country_id: 108, name: 'Mauritius', code: 'MU', iso_code: 'MUS', phone_code: '+230', flag: '🇲🇺' },
|
|
115
|
-
{ country_id: 109, name: 'Mexico', code: 'MX', iso_code: 'MEX', phone_code: '+52', flag: '🇲🇽' },
|
|
116
|
-
{ country_id: 110, name: 'Micronesia', code: 'FM', iso_code: 'FSM', phone_code: '+691', flag: '🇫🇲' },
|
|
117
|
-
{ country_id: 111, name: 'Moldova', code: 'MD', iso_code: 'MDA', phone_code: '+373', flag: '🇲🇩' },
|
|
118
|
-
{ country_id: 112, name: 'Monaco', code: 'MC', iso_code: 'MCO', phone_code: '+377', flag: '🇲🇨' },
|
|
119
|
-
{ country_id: 113, name: 'Mongolia', code: 'MN', iso_code: 'MNG', phone_code: '+976', flag: '🇲🇳' },
|
|
120
|
-
{ country_id: 114, name: 'Montenegro', code: 'ME', iso_code: 'MNE', phone_code: '+382', flag: '🇲🇪' },
|
|
121
|
-
{ country_id: 115, name: 'Morocco', code: 'MA', iso_code: 'MAR', phone_code: '+212', flag: '🇲🇦' },
|
|
122
|
-
{ country_id: 116, name: 'Mozambique', code: 'MZ', iso_code: 'MOZ', phone_code: '+258', flag: '🇲🇿' },
|
|
123
|
-
{ country_id: 117, name: 'Myanmar', code: 'MM', iso_code: 'MMR', phone_code: '+95', flag: '🇲🇲' },
|
|
124
|
-
{ country_id: 118, name: 'Namibia', code: 'NA', iso_code: 'NAM', phone_code: '+264', flag: '🇳🇦' },
|
|
125
|
-
{ country_id: 119, name: 'Nauru', code: 'NR', iso_code: 'NRU', phone_code: '+674', flag: '🇳🇷' },
|
|
126
|
-
{ country_id: 120, name: 'Nepal', code: 'NP', iso_code: 'NPL', phone_code: '+977', flag: '🇳🇵' },
|
|
127
|
-
{ country_id: 121, name: 'Netherlands', code: 'NL', iso_code: 'NLD', phone_code: '+31', flag: '🇳🇱' },
|
|
128
|
-
{ country_id: 122, name: 'New Zealand', code: 'NZ', iso_code: 'NZL', phone_code: '+64', flag: '🇳🇿' },
|
|
129
|
-
{ country_id: 123, name: 'Nicaragua', code: 'NI', iso_code: 'NIC', phone_code: '+505', flag: '🇳🇮' },
|
|
130
|
-
{ country_id: 124, name: 'Niger', code: 'NE', iso_code: 'NER', phone_code: '+227', flag: '🇳🇪' },
|
|
131
|
-
{ country_id: 125, name: 'Nigeria', code: 'NG', iso_code: 'NGA', phone_code: '+234', flag: '🇳🇬' },
|
|
132
|
-
{ country_id: 126, name: 'North Korea', code: 'KP', iso_code: 'PRK', phone_code: '+850', flag: '🇰🇵' },
|
|
133
|
-
{ country_id: 127, name: 'North Macedonia', code: 'MK', iso_code: 'MKD', phone_code: '+389', flag: '🇲🇰' },
|
|
134
|
-
{ country_id: 128, name: 'Norway', code: 'NO', iso_code: 'NOR', phone_code: '+47', flag: '🇳🇴' },
|
|
135
|
-
{ country_id: 129, name: 'Oman', code: 'OM', iso_code: 'OMN', phone_code: '+968', flag: '🇴🇲' },
|
|
136
|
-
{ country_id: 130, name: 'Pakistan', code: 'PK', iso_code: 'PAK', phone_code: '+92', flag: '🇵🇰' },
|
|
137
|
-
{ country_id: 131, name: 'Palau', code: 'PW', iso_code: 'PLW', phone_code: '+680', flag: '🇵🇼' },
|
|
138
|
-
{ country_id: 132, name: 'Palestine', code: 'PS', iso_code: 'PSE', phone_code: '+970', flag: '🇵🇸' },
|
|
139
|
-
{ country_id: 133, name: 'Panama', code: 'PA', iso_code: 'PAN', phone_code: '+507', flag: '🇵🇦' },
|
|
140
|
-
{ country_id: 134, name: 'Papua New Guinea', code: 'PG', iso_code: 'PNG', phone_code: '+675', flag: '🇵🇬' },
|
|
141
|
-
{ country_id: 135, name: 'Paraguay', code: 'PY', iso_code: 'PRY', phone_code: '+595', flag: '🇵🇾' },
|
|
142
|
-
{ country_id: 136, name: 'Peru', code: 'PE', iso_code: 'PER', phone_code: '+51', flag: '🇵🇪' },
|
|
143
|
-
{ country_id: 137, name: 'Philippines', code: 'PH', iso_code: 'PHL', phone_code: '+63', flag: '🇵🇭' },
|
|
144
|
-
{ country_id: 138, name: 'Poland', code: 'PL', iso_code: 'POL', phone_code: '+48', flag: '🇵🇱' },
|
|
145
|
-
{ country_id: 139, name: 'Portugal', code: 'PT', iso_code: 'PRT', phone_code: '+351', flag: '🇵🇹' },
|
|
146
|
-
{ country_id: 140, name: 'Qatar', code: 'QA', iso_code: 'QAT', phone_code: '+974', flag: '🇶🇦' },
|
|
147
|
-
{ country_id: 141, name: 'Romania', code: 'RO', iso_code: 'ROU', phone_code: '+40', flag: '🇷🇴' },
|
|
148
|
-
{ country_id: 142, name: 'Russia', code: 'RU', iso_code: 'RUS', phone_code: '+7', flag: '🇷🇺' },
|
|
149
|
-
{ country_id: 143, name: 'Rwanda', code: 'RW', iso_code: 'RWA', phone_code: '+250', flag: '🇷🇼' },
|
|
150
|
-
{ country_id: 144, name: 'Saint Kitts and Nevis', code: 'KN', iso_code: 'KNA', phone_code: '+1869', flag: '🇰🇳' },
|
|
151
|
-
{ country_id: 145, name: 'Saint Lucia', code: 'LC', iso_code: 'LCA', phone_code: '+1758', flag: '🇱🇨' },
|
|
152
|
-
{ country_id: 146, name: 'Saint Vincent and the Grenadines', code: 'VC', iso_code: 'VCT', phone_code: '+1784', flag: '🇻🇨' },
|
|
153
|
-
{ country_id: 147, name: 'Samoa', code: 'WS', iso_code: 'WSM', phone_code: '+685', flag: '🇼🇸' },
|
|
154
|
-
{ country_id: 148, name: 'San Marino', code: 'SM', iso_code: 'SMR', phone_code: '+378', flag: '🇸🇲' },
|
|
155
|
-
{ country_id: 149, name: 'Sao Tome and Principe', code: 'ST', iso_code: 'STP', phone_code: '+239', flag: '🇸🇹' },
|
|
156
|
-
{ country_id: 150, name: 'Saudi Arabia', code: 'SA', iso_code: 'SAU', phone_code: '+966', flag: '🇸🇦' },
|
|
157
|
-
{ country_id: 151, name: 'Senegal', code: 'SN', iso_code: 'SEN', phone_code: '+221', flag: '🇸🇳' },
|
|
158
|
-
{ country_id: 152, name: 'Serbia', code: 'RS', iso_code: 'SRB', phone_code: '+381', flag: '🇷🇸' },
|
|
159
|
-
{ country_id: 153, name: 'Seychelles', code: 'SC', iso_code: 'SYC', phone_code: '+248', flag: '🇸🇨' },
|
|
160
|
-
{ country_id: 154, name: 'Sierra Leone', code: 'SL', iso_code: 'SLE', phone_code: '+232', flag: '🇸🇱' },
|
|
161
|
-
{ country_id: 155, name: 'Singapore', code: 'SG', iso_code: 'SGP', phone_code: '+65', flag: '🇸🇬' },
|
|
162
|
-
{ country_id: 156, name: 'Slovakia', code: 'SK', iso_code: 'SVK', phone_code: '+421', flag: '🇸🇰' },
|
|
163
|
-
{ country_id: 157, name: 'Slovenia', code: 'SI', iso_code: 'SVN', phone_code: '+386', flag: '🇸🇮' },
|
|
164
|
-
{ country_id: 158, name: 'Solomon Islands', code: 'SB', iso_code: 'SLB', phone_code: '+677', flag: '🇸🇧' },
|
|
165
|
-
{ country_id: 159, name: 'Somalia', code: 'SO', iso_code: 'SOM', phone_code: '+252', flag: '🇸🇴' },
|
|
166
|
-
{ country_id: 160, name: 'South Africa', code: 'ZA', iso_code: 'ZAF', phone_code: '+27', flag: '🇿🇦' },
|
|
167
|
-
{ country_id: 161, name: 'South Korea', code: 'KR', iso_code: 'KOR', phone_code: '+82', flag: '🇰🇷' },
|
|
168
|
-
{ country_id: 162, name: 'South Sudan', code: 'SS', iso_code: 'SSD', phone_code: '+211', flag: '🇸🇸' },
|
|
169
|
-
{ country_id: 163, name: 'Spain', code: 'ES', iso_code: 'ESP', phone_code: '+34', flag: '🇪🇸' },
|
|
170
|
-
{ country_id: 164, name: 'Sri Lanka', code: 'LK', iso_code: 'LKA', phone_code: '+94', flag: '🇱🇰' },
|
|
171
|
-
{ country_id: 165, name: 'Sudan', code: 'SD', iso_code: 'SDN', phone_code: '+249', flag: '🇸🇩' },
|
|
172
|
-
{ country_id: 166, name: 'Suriname', code: 'SR', iso_code: 'SUR', phone_code: '+597', flag: '🇸🇷' },
|
|
173
|
-
{ country_id: 167, name: 'Sweden', code: 'SE', iso_code: 'SWE', phone_code: '+46', flag: '🇸🇪' },
|
|
174
|
-
{ country_id: 168, name: 'Switzerland', code: 'CH', iso_code: 'CHE', phone_code: '+41', flag: '🇨🇭' },
|
|
175
|
-
{ country_id: 169, name: 'Syria', code: 'SY', iso_code: 'SYR', phone_code: '+963', flag: '🇸🇾' },
|
|
176
|
-
{ country_id: 170, name: 'Taiwan', code: 'TW', iso_code: 'TWN', phone_code: '+886', flag: '🇹🇼' },
|
|
177
|
-
{ country_id: 171, name: 'Tajikistan', code: 'TJ', iso_code: 'TJK', phone_code: '+992', flag: '🇹🇯' },
|
|
178
|
-
{ country_id: 172, name: 'Tanzania', code: 'TZ', iso_code: 'TZA', phone_code: '+255', flag: '🇹🇿' },
|
|
179
|
-
{ country_id: 173, name: 'Thailand', code: 'TH', iso_code: 'THA', phone_code: '+66', flag: '🇹🇭' },
|
|
180
|
-
{ country_id: 174, name: 'Timor-Leste', code: 'TL', iso_code: 'TLS', phone_code: '+670', flag: '🇹🇱' },
|
|
181
|
-
{ country_id: 175, name: 'Togo', code: 'TG', iso_code: 'TGO', phone_code: '+228', flag: '🇹🇬' },
|
|
182
|
-
{ country_id: 176, name: 'Tonga', code: 'TO', iso_code: 'TON', phone_code: '+676', flag: '🇹🇴' },
|
|
183
|
-
{ country_id: 177, name: 'Trinidad and Tobago', code: 'TT', iso_code: 'TTO', phone_code: '+1868', flag: '🇹🇹' },
|
|
184
|
-
{ country_id: 178, name: 'Tunisia', code: 'TN', iso_code: 'TUN', phone_code: '+216', flag: '🇹🇳' },
|
|
185
|
-
{ country_id: 179, name: 'Turkey', code: 'TR', iso_code: 'TUR', phone_code: '+90', flag: '🇹🇷' },
|
|
186
|
-
{ country_id: 180, name: 'Turkmenistan', code: 'TM', iso_code: 'TKM', phone_code: '+993', flag: '🇹🇲' },
|
|
187
|
-
{ country_id: 181, name: 'Tuvalu', code: 'TV', iso_code: 'TUV', phone_code: '+688', flag: '🇹🇻' },
|
|
188
|
-
{ country_id: 182, name: 'Uganda', code: 'UG', iso_code: 'UGA', phone_code: '+256', flag: '🇺🇬' },
|
|
189
|
-
{ country_id: 183, name: 'Ukraine', code: 'UA', iso_code: 'UKR', phone_code: '+380', flag: '🇺🇦' },
|
|
190
|
-
{ country_id: 184, name: 'United Arab Emirates', code: 'AE', iso_code: 'ARE', phone_code: '+971', flag: '🇦🇪' },
|
|
191
|
-
{ country_id: 185, name: 'United Kingdom', code: 'GB', iso_code: 'GBR', phone_code: '+44', flag: '🇬🇧' },
|
|
192
|
-
{ country_id: 186, name: 'United States', code: 'US', iso_code: 'USA', phone_code: '+1', flag: '🇺🇸' },
|
|
193
|
-
{ country_id: 187, name: 'Uruguay', code: 'UY', iso_code: 'URY', phone_code: '+598', flag: '🇺🇾' },
|
|
194
|
-
{ country_id: 188, name: 'Uzbekistan', code: 'UZ', iso_code: 'UZB', phone_code: '+998', flag: '🇺🇿' },
|
|
195
|
-
{ country_id: 189, name: 'Vanuatu', code: 'VU', iso_code: 'VUT', phone_code: '+678', flag: '🇻🇺' },
|
|
196
|
-
{ country_id: 190, name: 'Vatican City', code: 'VA', iso_code: 'VAT', phone_code: '+39', flag: '🇻🇦' },
|
|
197
|
-
{ country_id: 191, name: 'Venezuela', code: 'VE', iso_code: 'VEN', phone_code: '+58', flag: '🇻🇪' },
|
|
198
|
-
{ country_id: 192, name: 'Vietnam', code: 'VN', iso_code: 'VNM', phone_code: '+84', flag: '🇻🇳' },
|
|
199
|
-
{ country_id: 193, name: 'Yemen', code: 'YE', iso_code: 'YEM', phone_code: '+967', flag: '🇾🇪' },
|
|
200
|
-
{ country_id: 194, name: 'Zambia', code: 'ZM', iso_code: 'ZMB', phone_code: '+260', flag: '🇿🇲' },
|
|
201
|
-
{ country_id: 195, name: 'Zimbabwe', code: 'ZW', iso_code: 'ZWE', phone_code: '+263', flag: '🇿🇼' }
|
|
202
|
-
]).onConflict('country_id').ignore();
|
|
203
|
-
};
|