diff --git a/Binner/Binner.Web/ClientApp/src/common/tmeCountries.js b/Binner/Binner.Web/ClientApp/src/common/tmeCountries.js new file mode 100644 index 00000000..581f7249 --- /dev/null +++ b/Binner/Binner.Web/ClientApp/src/common/tmeCountries.js @@ -0,0 +1,3 @@ +export const TmeCountries = + [{ "id": 1, "name": "Afghanistan", "iso3": "AFG", "iso2": "AF", "numeric_code": "004", "phone_code": 93, "capital": "Kabul", "currency": "AFN", "currency_name": "Afghan afghani", "currency_symbol": "؋", "tld": ".af", "native": "افغانستان", "region": "Asia", "subregion": "Southern Asia", "latitude": "33.00000000", "longitude": "65.00000000", "emoji": "🇦🇫" }, { "id": 2, "name": "Aland Islands", "iso3": "ALA", "iso2": "AX", "numeric_code": "248", "phone_code": 358, "capital": "Mariehamn", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".ax", "native": "Åland", "region": "Europe", "subregion": "Northern Europe", "latitude": "60.11666700", "longitude": "19.90000000", "emoji": "🇦🇽" }, { "id": 3, "name": "Albania", "iso3": "ALB", "iso2": "AL", "numeric_code": "008", "phone_code": 355, "capital": "Tirana", "currency": "ALL", "currency_name": "Albanian lek", "currency_symbol": "Lek", "tld": ".al", "native": "Shqipëria", "region": "Europe", "subregion": "Southern Europe", "latitude": "41.00000000", "longitude": "20.00000000", "emoji": "🇦🇱" }, { "id": 4, "name": "Algeria", "iso3": "DZA", "iso2": "DZ", "numeric_code": "012", "phone_code": 213, "capital": "Algiers", "currency": "DZD", "currency_name": "Algerian dinar", "currency_symbol": "دج", "tld": ".dz", "native": "الجزائر", "region": "Africa", "subregion": "Northern Africa", "latitude": "28.00000000", "longitude": "3.00000000", "emoji": "🇩🇿" }, { "id": 5, "name": "American Samoa", "iso3": "ASM", "iso2": "AS", "numeric_code": "016", "phone_code": 1, "capital": "Pago Pago", "currency": "USD", "currency_name": "US Dollar", "currency_symbol": "$", "tld": ".as", "native": "American Samoa", "region": "Oceania", "subregion": "Polynesia", "latitude": "-14.33333333", "longitude": "-170.00000000", "emoji": "🇦🇸" }, { "id": 6, "name": "Andorra", "iso3": "AND", "iso2": "AD", "numeric_code": "020", "phone_code": 376, "capital": "Andorra la Vella", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".ad", "native": "Andorra", "region": "Europe", "subregion": "Southern Europe", "latitude": "42.50000000", "longitude": "1.50000000", "emoji": "🇦🇩" }, { "id": 7, "name": "Angola", "iso3": "AGO", "iso2": "AO", "numeric_code": "024", "phone_code": 244, "capital": "Luanda", "currency": "AOA", "currency_name": "Angolan kwanza", "currency_symbol": "Kz", "tld": ".ao", "native": "Angola", "region": "Africa", "subregion": "Middle Africa", "latitude": "-12.50000000", "longitude": "18.50000000", "emoji": "🇦🇴" }, { "id": 8, "name": "Anguilla", "iso3": "AIA", "iso2": "AI", "numeric_code": "660", "phone_code": 1, "capital": "The Valley", "currency": "XCD", "currency_name": "East Caribbean dollar", "currency_symbol": "$", "tld": ".ai", "native": "Anguilla", "region": "Americas", "subregion": "Caribbean", "latitude": "18.25000000", "longitude": "-63.16666666", "emoji": "🇦🇮" }, { "id": 9, "name": "Antarctica", "iso3": "ATA", "iso2": "AQ", "numeric_code": "010", "phone_code": 672, "capital": "", "currency": "AAD", "currency_name": "Antarctican dollar", "currency_symbol": "$", "tld": ".aq", "native": "Antarctica", "region": "Polar", "subregion": "", "latitude": "-74.65000000", "longitude": "4.48000000", "emoji": "🇦🇶" }, { "id": 10, "name": "Antigua And Barbuda", "iso3": "ATG", "iso2": "AG", "numeric_code": "028", "phone_code": 1, "capital": "St. John's", "currency": "XCD", "currency_name": "Eastern Caribbean dollar", "currency_symbol": "$", "tld": ".ag", "native": "Antigua and Barbuda", "region": "Americas", "subregion": "Caribbean", "latitude": "17.05000000", "longitude": "-61.80000000", "emoji": "🇦🇬" }, { "id": 11, "name": "Argentina", "iso3": "ARG", "iso2": "AR", "numeric_code": "032", "phone_code": 54, "capital": "Buenos Aires", "currency": "ARS", "currency_name": "Argentine peso", "currency_symbol": "$", "tld": ".ar", "native": "Argentina", "region": "Americas", "subregion": "South America", "latitude": "-34.00000000", "longitude": "-64.00000000", "emoji": "🇦🇷" }, { "id": 12, "name": "Armenia", "iso3": "ARM", "iso2": "AM", "numeric_code": "051", "phone_code": 374, "capital": "Yerevan", "currency": "AMD", "currency_name": "Armenian dram", "currency_symbol": "֏", "tld": ".am", "native": "Հայաստան", "region": "Asia", "subregion": "Western Asia", "latitude": "40.00000000", "longitude": "45.00000000", "emoji": "🇦🇲" }, { "id": 13, "name": "Aruba", "iso3": "ABW", "iso2": "AW", "numeric_code": "533", "phone_code": 297, "capital": "Oranjestad", "currency": "AWG", "currency_name": "Aruban florin", "currency_symbol": "ƒ", "tld": ".aw", "native": "Aruba", "region": "Americas", "subregion": "Caribbean", "latitude": "12.50000000", "longitude": "-69.96666666", "emoji": "🇦🇼" }, { "id": 14, "name": "Australia", "iso3": "AUS", "iso2": "AU", "numeric_code": "036", "phone_code": 61, "capital": "Canberra", "currency": "AUD", "currency_name": "Australian dollar", "currency_symbol": "$", "tld": ".au", "native": "Australia", "region": "Oceania", "subregion": "Australia and New Zealand", "latitude": "-27.00000000", "longitude": "133.00000000", "emoji": "🇦🇺" }, { "id": 15, "name": "Austria", "iso3": "AUT", "iso2": "AT", "numeric_code": "040", "phone_code": 43, "capital": "Vienna", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".at", "native": "Österreich", "region": "Europe", "subregion": "Western Europe", "latitude": "47.33333333", "longitude": "13.33333333", "emoji": "🇦🇹" }, { "id": 16, "name": "Azerbaijan", "iso3": "AZE", "iso2": "AZ", "numeric_code": "031", "phone_code": 994, "capital": "Baku", "currency": "AZN", "currency_name": "Azerbaijani manat", "currency_symbol": "m", "tld": ".az", "native": "Azərbaycan", "region": "Asia", "subregion": "Western Asia", "latitude": "40.50000000", "longitude": "47.50000000", "emoji": "🇦🇿" }, { "id": 18, "name": "Bahrain", "iso3": "BHR", "iso2": "BH", "numeric_code": "048", "phone_code": 973, "capital": "Manama", "currency": "BHD", "currency_name": "Bahraini dinar", "currency_symbol": ".د.ب", "tld": ".bh", "native": "‏البحرين", "region": "Asia", "subregion": "Western Asia", "latitude": "26.00000000", "longitude": "50.55000000", "emoji": "🇧🇭" }, { "id": 19, "name": "Bangladesh", "iso3": "BGD", "iso2": "BD", "numeric_code": "050", "phone_code": 880, "capital": "Dhaka", "currency": "BDT", "currency_name": "Bangladeshi taka", "currency_symbol": "৳", "tld": ".bd", "native": "Bangladesh", "region": "Asia", "subregion": "Southern Asia", "latitude": "24.00000000", "longitude": "90.00000000", "emoji": "🇧🇩" }, { "id": 20, "name": "Barbados", "iso3": "BRB", "iso2": "BB", "numeric_code": "052", "phone_code": 1, "capital": "Bridgetown", "currency": "BBD", "currency_name": "Barbadian dollar", "currency_symbol": "Bds$", "tld": ".bb", "native": "Barbados", "region": "Americas", "subregion": "Caribbean", "latitude": "13.16666666", "longitude": "-59.53333333", "emoji": "🇧🇧" }, { "id": 21, "name": "Belarus", "iso3": "BLR", "iso2": "BY", "numeric_code": "112", "phone_code": 375, "capital": "Minsk", "currency": "BYN", "currency_name": "Belarusian ruble", "currency_symbol": "Br", "tld": ".by", "native": "Белару́сь", "region": "Europe", "subregion": "Eastern Europe", "latitude": "53.00000000", "longitude": "28.00000000", "emoji": "🇧🇾" }, { "id": 22, "name": "Belgium", "iso3": "BEL", "iso2": "BE", "numeric_code": "056", "phone_code": 32, "capital": "Brussels", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".be", "native": "België", "region": "Europe", "subregion": "Western Europe", "latitude": "50.83333333", "longitude": "4.00000000", "emoji": "🇧🇪" }, { "id": 23, "name": "Belize", "iso3": "BLZ", "iso2": "BZ", "numeric_code": "084", "phone_code": 501, "capital": "Belmopan", "currency": "BZD", "currency_name": "Belize dollar", "currency_symbol": "$", "tld": ".bz", "native": "Belize", "region": "Americas", "subregion": "Central America", "latitude": "17.25000000", "longitude": "-88.75000000", "emoji": "🇧🇿" }, { "id": 24, "name": "Benin", "iso3": "BEN", "iso2": "BJ", "numeric_code": "204", "phone_code": 229, "capital": "Porto-Novo", "currency": "XOF", "currency_name": "West African CFA franc", "currency_symbol": "CFA", "tld": ".bj", "native": "Bénin", "region": "Africa", "subregion": "Western Africa", "latitude": "9.50000000", "longitude": "2.25000000", "emoji": "🇧🇯" }, { "id": 25, "name": "Bermuda", "iso3": "BMU", "iso2": "BM", "numeric_code": "060", "phone_code": 1, "capital": "Hamilton", "currency": "BMD", "currency_name": "Bermudian dollar", "currency_symbol": "$", "tld": ".bm", "native": "Bermuda", "region": "Americas", "subregion": "Northern America", "latitude": "32.33333333", "longitude": "-64.75000000", "emoji": "🇧🇲" }, { "id": 26, "name": "Bhutan", "iso3": "BTN", "iso2": "BT", "numeric_code": "064", "phone_code": 975, "capital": "Thimphu", "currency": "BTN", "currency_name": "Bhutanese ngultrum", "currency_symbol": "Nu.", "tld": ".bt", "native": "ʼbrug-yul", "region": "Asia", "subregion": "Southern Asia", "latitude": "27.50000000", "longitude": "90.50000000", "emoji": "🇧🇹" }, { "id": 27, "name": "Bolivia", "iso3": "BOL", "iso2": "BO", "numeric_code": "068", "phone_code": 591, "capital": "Sucre", "currency": "BOB", "currency_name": "Bolivian boliviano", "currency_symbol": "Bs.", "tld": ".bo", "native": "Bolivia", "region": "Americas", "subregion": "South America", "latitude": "-17.00000000", "longitude": "-65.00000000", "emoji": "🇧🇴" }, { "id": 155, "name": "Bonaire, Sint Eustatius and Saba", "iso3": "BES", "iso2": "BQ", "numeric_code": "535", "phone_code": 599, "capital": "Kralendijk", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".an", "native": "Caribisch Nederland", "region": "Americas", "subregion": "Caribbean", "latitude": "12.15000000", "longitude": "-68.26666700", "emoji": "🇧🇶" }, { "id": 28, "name": "Bosnia and Herzegovina", "iso3": "BIH", "iso2": "BA", "numeric_code": "070", "phone_code": 387, "capital": "Sarajevo", "currency": "BAM", "currency_name": "Bosnia and Herzegovina convertible mark", "currency_symbol": "KM", "tld": ".ba", "native": "Bosna i Hercegovina", "region": "Europe", "subregion": "Southern Europe", "latitude": "44.00000000", "longitude": "18.00000000", "emoji": "🇧🇦" }, { "id": 29, "name": "Botswana", "iso3": "BWA", "iso2": "BW", "numeric_code": "072", "phone_code": 267, "capital": "Gaborone", "currency": "BWP", "currency_name": "Botswana pula", "currency_symbol": "P", "tld": ".bw", "native": "Botswana", "region": "Africa", "subregion": "Southern Africa", "latitude": "-22.00000000", "longitude": "24.00000000", "emoji": "🇧🇼" }, { "id": 30, "name": "Bouvet Island", "iso3": "BVT", "iso2": "BV", "numeric_code": "074", "phone_code": 55, "capital": "", "currency": "NOK", "currency_name": "Norwegian Krone", "currency_symbol": "kr", "tld": ".bv", "native": "Bouvetøya", "region": "", "subregion": "", "latitude": "-54.43333333", "longitude": "3.40000000", "emoji": "🇧🇻" }, { "id": 31, "name": "Brazil", "iso3": "BRA", "iso2": "BR", "numeric_code": "076", "phone_code": 55, "capital": "Brasilia", "currency": "BRL", "currency_name": "Brazilian real", "currency_symbol": "R$", "tld": ".br", "native": "Brasil", "region": "Americas", "subregion": "South America", "latitude": "-10.00000000", "longitude": "-55.00000000", "emoji": "🇧🇷" }, { "id": 32, "name": "British Indian Ocean Territory", "iso3": "IOT", "iso2": "IO", "numeric_code": "086", "phone_code": 246, "capital": "Diego Garcia", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".io", "native": "British Indian Ocean Territory", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-6.00000000", "longitude": "71.50000000", "emoji": "🇮🇴" }, { "id": 33, "name": "Brunei", "iso3": "BRN", "iso2": "BN", "numeric_code": "096", "phone_code": 673, "capital": "Bandar Seri Begawan", "currency": "BND", "currency_name": "Brunei dollar", "currency_symbol": "B$", "tld": ".bn", "native": "Negara Brunei Darussalam", "region": "Asia", "subregion": "South-Eastern Asia", "latitude": "4.50000000", "longitude": "114.66666666", "emoji": "🇧🇳" }, { "id": 34, "name": "Bulgaria", "iso3": "BGR", "iso2": "BG", "numeric_code": "100", "phone_code": 359, "capital": "Sofia", "currency": "BGN", "currency_name": "Bulgarian lev", "currency_symbol": "Лв.", "tld": ".bg", "native": "България", "region": "Europe", "subregion": "Eastern Europe", "latitude": "43.00000000", "longitude": "25.00000000", "emoji": "🇧🇬" }, { "id": 35, "name": "Burkina Faso", "iso3": "BFA", "iso2": "BF", "numeric_code": "854", "phone_code": 226, "capital": "Ouagadougou", "currency": "XOF", "currency_name": "West African CFA franc", "currency_symbol": "CFA", "tld": ".bf", "native": "Burkina Faso", "region": "Africa", "subregion": "Western Africa", "latitude": "13.00000000", "longitude": "-2.00000000", "emoji": "🇧🇫" }, { "id": 36, "name": "Burundi", "iso3": "BDI", "iso2": "BI", "numeric_code": "108", "phone_code": 257, "capital": "Bujumbura", "currency": "BIF", "currency_name": "Burundian franc", "currency_symbol": "FBu", "tld": ".bi", "native": "Burundi", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-3.50000000", "longitude": "30.00000000", "emoji": "🇧🇮" }, { "id": 37, "name": "Cambodia", "iso3": "KHM", "iso2": "KH", "numeric_code": "116", "phone_code": 855, "capital": "Phnom Penh", "currency": "KHR", "currency_name": "Cambodian riel", "currency_symbol": "KHR", "tld": ".kh", "native": "Kâmpŭchéa", "region": "Asia", "subregion": "South-Eastern Asia", "latitude": "13.00000000", "longitude": "105.00000000", "emoji": "🇰🇭" }, { "id": 38, "name": "Cameroon", "iso3": "CMR", "iso2": "CM", "numeric_code": "120", "phone_code": 237, "capital": "Yaounde", "currency": "XAF", "currency_name": "Central African CFA franc", "currency_symbol": "FCFA", "tld": ".cm", "native": "Cameroon", "region": "Africa", "subregion": "Middle Africa", "latitude": "6.00000000", "longitude": "12.00000000", "emoji": "🇨🇲" }, { "id": 39, "name": "Canada", "iso3": "CAN", "iso2": "CA", "numeric_code": "124", "phone_code": 1, "capital": "Ottawa", "currency": "CAD", "currency_name": "Canadian dollar", "currency_symbol": "$", "tld": ".ca", "native": "Canada", "region": "Americas", "subregion": "Northern America", "latitude": "60.00000000", "longitude": "-95.00000000", "emoji": "🇨🇦" }, { "id": 40, "name": "Cape Verde", "iso3": "CPV", "iso2": "CV", "numeric_code": "132", "phone_code": 238, "capital": "Praia", "currency": "CVE", "currency_name": "Cape Verdean escudo", "currency_symbol": "$", "tld": ".cv", "native": "Cabo Verde", "region": "Africa", "subregion": "Western Africa", "latitude": "16.00000000", "longitude": "-24.00000000", "emoji": "🇨🇻" }, { "id": 41, "name": "Cayman Islands", "iso3": "CYM", "iso2": "KY", "numeric_code": "136", "phone_code": 1, "capital": "George Town", "currency": "KYD", "currency_name": "Cayman Islands dollar", "currency_symbol": "$", "tld": ".ky", "native": "Cayman Islands", "region": "Americas", "subregion": "Caribbean", "latitude": "19.50000000", "longitude": "-80.50000000", "emoji": "🇰🇾" }, { "id": 42, "name": "Central African Republic", "iso3": "CAF", "iso2": "CF", "numeric_code": "140", "phone_code": 236, "capital": "Bangui", "currency": "XAF", "currency_name": "Central African CFA franc", "currency_symbol": "FCFA", "tld": ".cf", "native": "Ködörösêse tî Bêafrîka", "region": "Africa", "subregion": "Middle Africa", "latitude": "7.00000000", "longitude": "21.00000000", "emoji": "🇨🇫" }, { "id": 43, "name": "Chad", "iso3": "TCD", "iso2": "TD", "numeric_code": "148", "phone_code": 235, "capital": "N'Djamena", "currency": "XAF", "currency_name": "Central African CFA franc", "currency_symbol": "FCFA", "tld": ".td", "native": "Tchad", "region": "Africa", "subregion": "Middle Africa", "latitude": "15.00000000", "longitude": "19.00000000", "emoji": "🇹🇩" }, { "id": 44, "name": "Chile", "iso3": "CHL", "iso2": "CL", "numeric_code": "152", "phone_code": 56, "capital": "Santiago", "currency": "CLP", "currency_name": "Chilean peso", "currency_symbol": "$", "tld": ".cl", "native": "Chile", "region": "Americas", "subregion": "South America", "latitude": "-30.00000000", "longitude": "-71.00000000", "emoji": "🇨🇱" }, { "id": 45, "name": "China", "iso3": "CHN", "iso2": "CN", "numeric_code": "156", "phone_code": 86, "capital": "Beijing", "currency": "CNY", "currency_name": "Chinese yuan", "currency_symbol": "¥", "tld": ".cn", "native": "中国", "region": "Asia", "subregion": "Eastern Asia", "latitude": "35.00000000", "longitude": "105.00000000", "emoji": "🇨🇳" }, { "id": 46, "name": "Christmas Island", "iso3": "CXR", "iso2": "CX", "numeric_code": "162", "phone_code": 61, "capital": "Flying Fish Cove", "currency": "AUD", "currency_name": "Australian dollar", "currency_symbol": "$", "tld": ".cx", "native": "Christmas Island", "region": "Oceania", "subregion": "Australia and New Zealand", "latitude": "-10.50000000", "longitude": "105.66666666", "emoji": "🇨🇽" }, { "id": 47, "name": "Cocos (Keeling) Islands", "iso3": "CCK", "iso2": "CC", "numeric_code": "166", "phone_code": 61, "capital": "West Island", "currency": "AUD", "currency_name": "Australian dollar", "currency_symbol": "$", "tld": ".cc", "native": "Cocos (Keeling) Islands", "region": "Oceania", "subregion": "Australia and New Zealand", "latitude": "-12.50000000", "longitude": "96.83333333", "emoji": "🇨🇨" }, { "id": 48, "name": "Colombia", "iso3": "COL", "iso2": "CO", "numeric_code": "170", "phone_code": 57, "capital": "Bogotá", "currency": "COP", "currency_name": "Colombian peso", "currency_symbol": "$", "tld": ".co", "native": "Colombia", "region": "Americas", "subregion": "South America", "latitude": "4.00000000", "longitude": "-72.00000000", "emoji": "🇨🇴" }, { "id": 49, "name": "Comoros", "iso3": "COM", "iso2": "KM", "numeric_code": "174", "phone_code": 269, "capital": "Moroni", "currency": "KMF", "currency_name": "Comorian franc", "currency_symbol": "CF", "tld": ".km", "native": "Komori", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-12.16666666", "longitude": "44.25000000", "emoji": "🇰🇲" }, { "id": 50, "name": "Congo", "iso3": "COG", "iso2": "CG", "numeric_code": "178", "phone_code": 242, "capital": "Brazzaville", "currency": "XAF", "currency_name": "Central African CFA franc", "currency_symbol": "FC", "tld": ".cg", "native": "République du Congo", "region": "Africa", "subregion": "Middle Africa", "latitude": "-1.00000000", "longitude": "15.00000000", "emoji": "🇨🇬" }, { "id": 52, "name": "Cook Islands", "iso3": "COK", "iso2": "CK", "numeric_code": "184", "phone_code": 682, "capital": "Avarua", "currency": "NZD", "currency_name": "Cook Islands dollar", "currency_symbol": "$", "tld": ".ck", "native": "Cook Islands", "region": "Oceania", "subregion": "Polynesia", "latitude": "-21.23333333", "longitude": "-159.76666666", "emoji": "🇨🇰" }, { "id": 53, "name": "Costa Rica", "iso3": "CRI", "iso2": "CR", "numeric_code": "188", "phone_code": 506, "capital": "San Jose", "currency": "CRC", "currency_name": "Costa Rican colón", "currency_symbol": "₡", "tld": ".cr", "native": "Costa Rica", "region": "Americas", "subregion": "Central America", "latitude": "10.00000000", "longitude": "-84.00000000", "emoji": "🇨🇷" }, { "id": 54, "name": "Cote D'Ivoire (Ivory Coast)", "iso3": "CIV", "iso2": "CI", "numeric_code": "384", "phone_code": 225, "capital": "Yamoussoukro", "currency": "XOF", "currency_name": "West African CFA franc", "currency_symbol": "CFA", "tld": ".ci", "native": null, "region": "Africa", "subregion": "Western Africa", "latitude": "8.00000000", "longitude": "-5.00000000", "emoji": "🇨🇮" }, { "id": 55, "name": "Croatia", "iso3": "HRV", "iso2": "HR", "numeric_code": "191", "phone_code": 385, "capital": "Zagreb", "currency": "HRK", "currency_name": "Croatian kuna", "currency_symbol": "kn", "tld": ".hr", "native": "Hrvatska", "region": "Europe", "subregion": "Southern Europe", "latitude": "45.16666666", "longitude": "15.50000000", "emoji": "🇭🇷" }, { "id": 56, "name": "Cuba", "iso3": "CUB", "iso2": "CU", "numeric_code": "192", "phone_code": 53, "capital": "Havana", "currency": "CUP", "currency_name": "Cuban peso", "currency_symbol": "$", "tld": ".cu", "native": "Cuba", "region": "Americas", "subregion": "Caribbean", "latitude": "21.50000000", "longitude": "-80.00000000", "emoji": "🇨🇺" }, { "id": 249, "name": "Curaçao", "iso3": "CUW", "iso2": "CW", "numeric_code": "531", "phone_code": 599, "capital": "Willemstad", "currency": "ANG", "currency_name": "Netherlands Antillean guilder", "currency_symbol": "ƒ", "tld": ".cw", "native": "Curaçao", "region": "Americas", "subregion": "Caribbean", "latitude": "12.11666700", "longitude": "-68.93333300", "emoji": "🇨🇼" }, { "id": 57, "name": "Cyprus", "iso3": "CYP", "iso2": "CY", "numeric_code": "196", "phone_code": 357, "capital": "Nicosia", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".cy", "native": "Κύπρος", "region": "Europe", "subregion": "Southern Europe", "latitude": "35.00000000", "longitude": "33.00000000", "emoji": "🇨🇾" }, { "id": 58, "name": "Czech Republic", "iso3": "CZE", "iso2": "CZ", "numeric_code": "203", "phone_code": 420, "capital": "Prague", "currency": "CZK", "currency_name": "Czech koruna", "currency_symbol": "Kč", "tld": ".cz", "native": "Česká republika", "region": "Europe", "subregion": "Eastern Europe", "latitude": "49.75000000", "longitude": "15.50000000", "emoji": "🇨🇿" }, { "id": 51, "name": "Democratic Republic of the Congo", "iso3": "COD", "iso2": "CD", "numeric_code": "180", "phone_code": 243, "capital": "Kinshasa", "currency": "CDF", "currency_name": "Congolese Franc", "currency_symbol": "FC", "tld": ".cd", "native": "République démocratique du Congo", "region": "Africa", "subregion": "Middle Africa", "latitude": "0.00000000", "longitude": "25.00000000", "emoji": "🇨🇩" }, { "id": 59, "name": "Denmark", "iso3": "DNK", "iso2": "DK", "numeric_code": "208", "phone_code": 45, "capital": "Copenhagen", "currency": "DKK", "currency_name": "Danish krone", "currency_symbol": "Kr.", "tld": ".dk", "native": "Danmark", "region": "Europe", "subregion": "Northern Europe", "latitude": "56.00000000", "longitude": "10.00000000", "emoji": "🇩🇰" }, { "id": 60, "name": "Djibouti", "iso3": "DJI", "iso2": "DJ", "numeric_code": "262", "phone_code": 253, "capital": "Djibouti", "currency": "DJF", "currency_name": "Djiboutian franc", "currency_symbol": "Fdj", "tld": ".dj", "native": "Djibouti", "region": "Africa", "subregion": "Eastern Africa", "latitude": "11.50000000", "longitude": "43.00000000", "emoji": "🇩🇯" }, { "id": 61, "name": "Dominica", "iso3": "DMA", "iso2": "DM", "numeric_code": "212", "phone_code": 1, "capital": "Roseau", "currency": "XCD", "currency_name": "Eastern Caribbean dollar", "currency_symbol": "$", "tld": ".dm", "native": "Dominica", "region": "Americas", "subregion": "Caribbean", "latitude": "15.41666666", "longitude": "-61.33333333", "emoji": "🇩🇲" }, { "id": 62, "name": "Dominican Republic", "iso3": "DOM", "iso2": "DO", "numeric_code": "214", "phone_code": 1, "capital": "Santo Domingo", "currency": "DOP", "currency_name": "Dominican peso", "currency_symbol": "$", "tld": ".do", "native": "República Dominicana", "region": "Americas", "subregion": "Caribbean", "latitude": "19.00000000", "longitude": "-70.66666666", "emoji": "🇩🇴" }, { "id": 63, "name": "East Timor", "iso3": "TLS", "iso2": "TL", "numeric_code": "626", "phone_code": 670, "capital": "Dili", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".tl", "native": "Timor-Leste", "region": "Asia", "subregion": "South-Eastern Asia", "latitude": "-8.83333333", "longitude": "125.91666666", "emoji": "🇹🇱" }, { "id": 64, "name": "Ecuador", "iso3": "ECU", "iso2": "EC", "numeric_code": "218", "phone_code": 593, "capital": "Quito", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".ec", "native": "Ecuador", "region": "Americas", "subregion": "South America", "latitude": "-2.00000000", "longitude": "-77.50000000", "emoji": "🇪🇨" }, { "id": 65, "name": "Egypt", "iso3": "EGY", "iso2": "EG", "numeric_code": "818", "phone_code": 20, "capital": "Cairo", "currency": "EGP", "currency_name": "Egyptian pound", "currency_symbol": "ج.م", "tld": ".eg", "native": "مصر‎", "region": "Africa", "subregion": "Northern Africa", "latitude": "27.00000000", "longitude": "30.00000000", "emoji": "🇪🇬" }, { "id": 66, "name": "El Salvador", "iso3": "SLV", "iso2": "SV", "numeric_code": "222", "phone_code": 503, "capital": "San Salvador", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".sv", "native": "El Salvador", "region": "Americas", "subregion": "Central America", "latitude": "13.83333333", "longitude": "-88.91666666", "emoji": "🇸🇻" }, { "id": 67, "name": "Equatorial Guinea", "iso3": "GNQ", "iso2": "GQ", "numeric_code": "226", "phone_code": 240, "capital": "Malabo", "currency": "XAF", "currency_name": "Central African CFA franc", "currency_symbol": "FCFA", "tld": ".gq", "native": "Guinea Ecuatorial", "region": "Africa", "subregion": "Middle Africa", "latitude": "2.00000000", "longitude": "10.00000000", "emoji": "🇬🇶" }, { "id": 68, "name": "Eritrea", "iso3": "ERI", "iso2": "ER", "numeric_code": "232", "phone_code": 291, "capital": "Asmara", "currency": "ERN", "currency_name": "Eritrean nakfa", "currency_symbol": "Nfk", "tld": ".er", "native": "ኤርትራ", "region": "Africa", "subregion": "Eastern Africa", "latitude": "15.00000000", "longitude": "39.00000000", "emoji": "🇪🇷" }, { "id": 69, "name": "Estonia", "iso3": "EST", "iso2": "EE", "numeric_code": "233", "phone_code": 372, "capital": "Tallinn", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".ee", "native": "Eesti", "region": "Europe", "subregion": "Northern Europe", "latitude": "59.00000000", "longitude": "26.00000000", "emoji": "🇪🇪" }, { "id": 70, "name": "Ethiopia", "iso3": "ETH", "iso2": "ET", "numeric_code": "231", "phone_code": 251, "capital": "Addis Ababa", "currency": "ETB", "currency_name": "Ethiopian birr", "currency_symbol": "Nkf", "tld": ".et", "native": "ኢትዮጵያ", "region": "Africa", "subregion": "Eastern Africa", "latitude": "8.00000000", "longitude": "38.00000000", "emoji": "🇪🇹" }, { "id": 71, "name": "Falkland Islands", "iso3": "FLK", "iso2": "FK", "numeric_code": "238", "phone_code": 500, "capital": "Stanley", "currency": "FKP", "currency_name": "Falkland Islands pound", "currency_symbol": "£", "tld": ".fk", "native": "Falkland Islands", "region": "Americas", "subregion": "South America", "latitude": "-51.75000000", "longitude": "-59.00000000", "emoji": "🇫🇰" }, { "id": 72, "name": "Faroe Islands", "iso3": "FRO", "iso2": "FO", "numeric_code": "234", "phone_code": 298, "capital": "Torshavn", "currency": "DKK", "currency_name": "Danish krone", "currency_symbol": "Kr.", "tld": ".fo", "native": "Føroyar", "region": "Europe", "subregion": "Northern Europe", "latitude": "62.00000000", "longitude": "-7.00000000", "emoji": "🇫🇴" }, { "id": 73, "name": "Fiji Islands", "iso3": "FJI", "iso2": "FJ", "numeric_code": "242", "phone_code": 679, "capital": "Suva", "currency": "FJD", "currency_name": "Fijian dollar", "currency_symbol": "FJ$", "tld": ".fj", "native": "Fiji", "region": "Oceania", "subregion": "Melanesia", "latitude": "-18.00000000", "longitude": "175.00000000", "emoji": "🇫🇯" }, { "id": 74, "name": "Finland", "iso3": "FIN", "iso2": "FI", "numeric_code": "246", "phone_code": 358, "capital": "Helsinki", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".fi", "native": "Suomi", "region": "Europe", "subregion": "Northern Europe", "latitude": "64.00000000", "longitude": "26.00000000", "emoji": "🇫🇮" }, { "id": 75, "name": "France", "iso3": "FRA", "iso2": "FR", "numeric_code": "250", "phone_code": 33, "capital": "Paris", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".fr", "native": "France", "region": "Europe", "subregion": "Western Europe", "latitude": "46.00000000", "longitude": "2.00000000", "emoji": "🇫🇷" }, { "id": 76, "name": "French Guiana", "iso3": "GUF", "iso2": "GF", "numeric_code": "254", "phone_code": 594, "capital": "Cayenne", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".gf", "native": "Guyane française", "region": "Americas", "subregion": "South America", "latitude": "4.00000000", "longitude": "-53.00000000", "emoji": "🇬🇫" }, { "id": 77, "name": "French Polynesia", "iso3": "PYF", "iso2": "PF", "numeric_code": "258", "phone_code": 689, "capital": "Papeete", "currency": "XPF", "currency_name": "CFP franc", "currency_symbol": "₣", "tld": ".pf", "native": "Polynésie française", "region": "Oceania", "subregion": "Polynesia", "latitude": "-15.00000000", "longitude": "-140.00000000", "emoji": "🇵🇫" }, { "id": 78, "name": "French Southern Territories", "iso3": "ATF", "iso2": "TF", "numeric_code": "260", "phone_code": 262, "capital": "Port-aux-Francais", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".tf", "native": "Territoire des Terres australes et antarctiques fr", "region": "Africa", "subregion": "Southern Africa", "latitude": "-49.25000000", "longitude": "69.16700000", "emoji": "🇹🇫" }, { "id": 79, "name": "Gabon", "iso3": "GAB", "iso2": "GA", "numeric_code": "266", "phone_code": 241, "capital": "Libreville", "currency": "XAF", "currency_name": "Central African CFA franc", "currency_symbol": "FCFA", "tld": ".ga", "native": "Gabon", "region": "Africa", "subregion": "Middle Africa", "latitude": "-1.00000000", "longitude": "11.75000000", "emoji": "🇬🇦" }, { "id": 80, "name": "Gambia The", "iso3": "GMB", "iso2": "GM", "numeric_code": "270", "phone_code": 220, "capital": "Banjul", "currency": "GMD", "currency_name": "Gambian dalasi", "currency_symbol": "D", "tld": ".gm", "native": "Gambia", "region": "Africa", "subregion": "Western Africa", "latitude": "13.46666666", "longitude": "-16.56666666", "emoji": "🇬🇲" }, { "id": 81, "name": "Georgia", "iso3": "GEO", "iso2": "GE", "numeric_code": "268", "phone_code": 995, "capital": "Tbilisi", "currency": "GEL", "currency_name": "Georgian lari", "currency_symbol": "ლ", "tld": ".ge", "native": "საქართველო", "region": "Asia", "subregion": "Western Asia", "latitude": "42.00000000", "longitude": "43.50000000", "emoji": "🇬🇪" }, { "id": 82, "name": "Germany", "iso3": "DEU", "iso2": "DE", "numeric_code": "276", "phone_code": 49, "capital": "Berlin", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".de", "native": "Deutschland", "region": "Europe", "subregion": "Western Europe", "latitude": "51.00000000", "longitude": "9.00000000", "emoji": "🇩🇪" }, { "id": 83, "name": "Ghana", "iso3": "GHA", "iso2": "GH", "numeric_code": "288", "phone_code": 233, "capital": "Accra", "currency": "GHS", "currency_name": "Ghanaian cedi", "currency_symbol": "GH₵", "tld": ".gh", "native": "Ghana", "region": "Africa", "subregion": "Western Africa", "latitude": "8.00000000", "longitude": "-2.00000000", "emoji": "🇬🇭" }, { "id": 84, "name": "Gibraltar", "iso3": "GIB", "iso2": "GI", "numeric_code": "292", "phone_code": 350, "capital": "Gibraltar", "currency": "GIP", "currency_name": "Gibraltar pound", "currency_symbol": "£", "tld": ".gi", "native": "Gibraltar", "region": "Europe", "subregion": "Southern Europe", "latitude": "36.13333333", "longitude": "-5.35000000", "emoji": "🇬🇮" }, { "id": 85, "name": "Greece", "iso3": "GRC", "iso2": "GR", "numeric_code": "300", "phone_code": 30, "capital": "Athens", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".gr", "native": "Ελλάδα", "region": "Europe", "subregion": "Southern Europe", "latitude": "39.00000000", "longitude": "22.00000000", "emoji": "🇬🇷" }, { "id": 86, "name": "Greenland", "iso3": "GRL", "iso2": "GL", "numeric_code": "304", "phone_code": 299, "capital": "Nuuk", "currency": "DKK", "currency_name": "Danish krone", "currency_symbol": "Kr.", "tld": ".gl", "native": "Kalaallit Nunaat", "region": "Americas", "subregion": "Northern America", "latitude": "72.00000000", "longitude": "-40.00000000", "emoji": "🇬🇱" }, { "id": 87, "name": "Grenada", "iso3": "GRD", "iso2": "GD", "numeric_code": "308", "phone_code": 1, "capital": "St. George's", "currency": "XCD", "currency_name": "Eastern Caribbean dollar", "currency_symbol": "$", "tld": ".gd", "native": "Grenada", "region": "Americas", "subregion": "Caribbean", "latitude": "12.11666666", "longitude": "-61.66666666", "emoji": "🇬🇩" }, { "id": 88, "name": "Guadeloupe", "iso3": "GLP", "iso2": "GP", "numeric_code": "312", "phone_code": 590, "capital": "Basse-Terre", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".gp", "native": "Guadeloupe", "region": "Americas", "subregion": "Caribbean", "latitude": "16.25000000", "longitude": "-61.58333300", "emoji": "🇬🇵" }, { "id": 89, "name": "Guam", "iso3": "GUM", "iso2": "GU", "numeric_code": "316", "phone_code": 1, "capital": "Hagatna", "currency": "USD", "currency_name": "US Dollar", "currency_symbol": "$", "tld": ".gu", "native": "Guam", "region": "Oceania", "subregion": "Micronesia", "latitude": "13.46666666", "longitude": "144.78333333", "emoji": "🇬🇺" }, { "id": 90, "name": "Guatemala", "iso3": "GTM", "iso2": "GT", "numeric_code": "320", "phone_code": 502, "capital": "Guatemala City", "currency": "GTQ", "currency_name": "Guatemalan quetzal", "currency_symbol": "Q", "tld": ".gt", "native": "Guatemala", "region": "Americas", "subregion": "Central America", "latitude": "15.50000000", "longitude": "-90.25000000", "emoji": "🇬🇹" }, { "id": 91, "name": "Guernsey and Alderney", "iso3": "GGY", "iso2": "GG", "numeric_code": "831", "phone_code": 44, "capital": "St Peter Port", "currency": "GBP", "currency_name": "British pound", "currency_symbol": "£", "tld": ".gg", "native": "Guernsey", "region": "Europe", "subregion": "Northern Europe", "latitude": "49.46666666", "longitude": "-2.58333333", "emoji": "🇬🇬" }, { "id": 92, "name": "Guinea", "iso3": "GIN", "iso2": "GN", "numeric_code": "324", "phone_code": 224, "capital": "Conakry", "currency": "GNF", "currency_name": "Guinean franc", "currency_symbol": "FG", "tld": ".gn", "native": "Guinée", "region": "Africa", "subregion": "Western Africa", "latitude": "11.00000000", "longitude": "-10.00000000", "emoji": "🇬🇳" }, { "id": 93, "name": "Guinea-Bissau", "iso3": "GNB", "iso2": "GW", "numeric_code": "624", "phone_code": 245, "capital": "Bissau", "currency": "XOF", "currency_name": "West African CFA franc", "currency_symbol": "CFA", "tld": ".gw", "native": "Guiné-Bissau", "region": "Africa", "subregion": "Western Africa", "latitude": "12.00000000", "longitude": "-15.00000000", "emoji": "🇬🇼" }, { "id": 94, "name": "Guyana", "iso3": "GUY", "iso2": "GY", "numeric_code": "328", "phone_code": 592, "capital": "Georgetown", "currency": "GYD", "currency_name": "Guyanese dollar", "currency_symbol": "$", "tld": ".gy", "native": "Guyana", "region": "Americas", "subregion": "South America", "latitude": "5.00000000", "longitude": "-59.00000000", "emoji": "🇬🇾" }, { "id": 95, "name": "Haiti", "iso3": "HTI", "iso2": "HT", "numeric_code": "332", "phone_code": 509, "capital": "Port-au-Prince", "currency": "HTG", "currency_name": "Haitian gourde", "currency_symbol": "G", "tld": ".ht", "native": "Haïti", "region": "Americas", "subregion": "Caribbean", "latitude": "19.00000000", "longitude": "-72.41666666", "emoji": "🇭🇹" }, { "id": 96, "name": "Heard Island and McDonald Islands", "iso3": "HMD", "iso2": "HM", "numeric_code": "334", "phone_code": 672, "capital": "", "currency": "AUD", "currency_name": "Australian dollar", "currency_symbol": "$", "tld": ".hm", "native": "Heard Island and McDonald Islands", "region": "", "subregion": "", "latitude": "-53.10000000", "longitude": "72.51666666", "emoji": "🇭🇲" }, { "id": 97, "name": "Honduras", "iso3": "HND", "iso2": "HN", "numeric_code": "340", "phone_code": 504, "capital": "Tegucigalpa", "currency": "HNL", "currency_name": "Honduran lempira", "currency_symbol": "L", "tld": ".hn", "native": "Honduras", "region": "Americas", "subregion": "Central America", "latitude": "15.00000000", "longitude": "-86.50000000", "emoji": "🇭🇳" }, { "id": 98, "name": "Hong Kong S.A.R.", "iso3": "HKG", "iso2": "HK", "numeric_code": "344", "phone_code": 852, "capital": "Hong Kong", "currency": "HKD", "currency_name": "Hong Kong dollar", "currency_symbol": "$", "tld": ".hk", "native": "香港", "region": "Asia", "subregion": "Eastern Asia", "latitude": "22.25000000", "longitude": "114.16666666", "emoji": "🇭🇰" }, { "id": 99, "name": "Hungary", "iso3": "HUN", "iso2": "HU", "numeric_code": "348", "phone_code": 36, "capital": "Budapest", "currency": "HUF", "currency_name": "Hungarian forint", "currency_symbol": "Ft", "tld": ".hu", "native": "Magyarország", "region": "Europe", "subregion": "Eastern Europe", "latitude": "47.00000000", "longitude": "20.00000000", "emoji": "🇭🇺" }, { "id": 100, "name": "Iceland", "iso3": "ISL", "iso2": "IS", "numeric_code": "352", "phone_code": 354, "capital": "Reykjavik", "currency": "ISK", "currency_name": "Icelandic króna", "currency_symbol": "kr", "tld": ".is", "native": "Ísland", "region": "Europe", "subregion": "Northern Europe", "latitude": "65.00000000", "longitude": "-18.00000000", "emoji": "🇮🇸" }, { "id": 101, "name": "India", "iso3": "IND", "iso2": "IN", "numeric_code": "356", "phone_code": 91, "capital": "New Delhi", "currency": "INR", "currency_name": "Indian rupee", "currency_symbol": "₹", "tld": ".in", "native": "भारत", "region": "Asia", "subregion": "Southern Asia", "latitude": "20.00000000", "longitude": "77.00000000", "emoji": "🇮🇳" }, { "id": 102, "name": "Indonesia", "iso3": "IDN", "iso2": "ID", "numeric_code": "360", "phone_code": 62, "capital": "Jakarta", "currency": "IDR", "currency_name": "Indonesian rupiah", "currency_symbol": "Rp", "tld": ".id", "native": "Indonesia", "region": "Asia", "subregion": "South-Eastern Asia", "latitude": "-5.00000000", "longitude": "120.00000000", "emoji": "🇮🇩" }, { "id": 103, "name": "Iran", "iso3": "IRN", "iso2": "IR", "numeric_code": "364", "phone_code": 98, "capital": "Tehran", "currency": "IRR", "currency_name": "Iranian rial", "currency_symbol": "﷼", "tld": ".ir", "native": "ایران", "region": "Asia", "subregion": "Southern Asia", "latitude": "32.00000000", "longitude": "53.00000000", "emoji": "🇮🇷" }, { "id": 104, "name": "Iraq", "iso3": "IRQ", "iso2": "IQ", "numeric_code": "368", "phone_code": 964, "capital": "Baghdad", "currency": "IQD", "currency_name": "Iraqi dinar", "currency_symbol": "د.ع", "tld": ".iq", "native": "العراق", "region": "Asia", "subregion": "Western Asia", "latitude": "33.00000000", "longitude": "44.00000000", "emoji": "🇮🇶" }, { "id": 105, "name": "Ireland", "iso3": "IRL", "iso2": "IE", "numeric_code": "372", "phone_code": 353, "capital": "Dublin", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".ie", "native": "Éire", "region": "Europe", "subregion": "Northern Europe", "latitude": "53.00000000", "longitude": "-8.00000000", "emoji": "🇮🇪" }, { "id": 106, "name": "Israel", "iso3": "ISR", "iso2": "IL", "numeric_code": "376", "phone_code": 972, "capital": "Jerusalem", "currency": "ILS", "currency_name": "Israeli new shekel", "currency_symbol": "₪", "tld": ".il", "native": "יִשְׂרָאֵל", "region": "Asia", "subregion": "Western Asia", "latitude": "31.50000000", "longitude": "34.75000000", "emoji": "🇮🇱" }, { "id": 107, "name": "Italy", "iso3": "ITA", "iso2": "IT", "numeric_code": "380", "phone_code": 39, "capital": "Rome", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".it", "native": "Italia", "region": "Europe", "subregion": "Southern Europe", "latitude": "42.83333333", "longitude": "12.83333333", "emoji": "🇮🇹" }, { "id": 108, "name": "Jamaica", "iso3": "JAM", "iso2": "JM", "numeric_code": "388", "phone_code": 1, "capital": "Kingston", "currency": "JMD", "currency_name": "Jamaican dollar", "currency_symbol": "J$", "tld": ".jm", "native": "Jamaica", "region": "Americas", "subregion": "Caribbean", "latitude": "18.25000000", "longitude": "-77.50000000", "emoji": "🇯🇲" }, { "id": 109, "name": "Japan", "iso3": "JPN", "iso2": "JP", "numeric_code": "392", "phone_code": 81, "capital": "Tokyo", "currency": "JPY", "currency_name": "Japanese yen", "currency_symbol": "¥", "tld": ".jp", "native": "日本", "region": "Asia", "subregion": "Eastern Asia", "latitude": "36.00000000", "longitude": "138.00000000", "emoji": "🇯🇵" }, { "id": 110, "name": "Jersey", "iso3": "JEY", "iso2": "JE", "numeric_code": "832", "phone_code": 44, "capital": "Saint Helier", "currency": "GBP", "currency_name": "British pound", "currency_symbol": "£", "tld": ".je", "native": "Jersey", "region": "Europe", "subregion": "Northern Europe", "latitude": "49.25000000", "longitude": "-2.16666666", "emoji": "🇯🇪" }, { "id": 111, "name": "Jordan", "iso3": "JOR", "iso2": "JO", "numeric_code": "400", "phone_code": 962, "capital": "Amman", "currency": "JOD", "currency_name": "Jordanian dinar", "currency_symbol": "ا.د", "tld": ".jo", "native": "الأردن", "region": "Asia", "subregion": "Western Asia", "latitude": "31.00000000", "longitude": "36.00000000", "emoji": "🇯🇴" }, { "id": 112, "name": "Kazakhstan", "iso3": "KAZ", "iso2": "KZ", "numeric_code": "398", "phone_code": 7, "capital": "Astana", "currency": "KZT", "currency_name": "Kazakhstani tenge", "currency_symbol": "лв", "tld": ".kz", "native": "Қазақстан", "region": "Asia", "subregion": "Central Asia", "latitude": "48.00000000", "longitude": "68.00000000", "emoji": "🇰🇿" }, { "id": 113, "name": "Kenya", "iso3": "KEN", "iso2": "KE", "numeric_code": "404", "phone_code": 254, "capital": "Nairobi", "currency": "KES", "currency_name": "Kenyan shilling", "currency_symbol": "KSh", "tld": ".ke", "native": "Kenya", "region": "Africa", "subregion": "Eastern Africa", "latitude": "1.00000000", "longitude": "38.00000000", "emoji": "🇰🇪" }, { "id": 114, "name": "Kiribati", "iso3": "KIR", "iso2": "KI", "numeric_code": "296", "phone_code": 686, "capital": "Tarawa", "currency": "AUD", "currency_name": "Australian dollar", "currency_symbol": "$", "tld": ".ki", "native": "Kiribati", "region": "Oceania", "subregion": "Micronesia", "latitude": "1.41666666", "longitude": "173.00000000", "emoji": "🇰🇮" }, { "id": 248, "name": "Kosovo", "iso3": "XKX", "iso2": "XK", "numeric_code": "926", "phone_code": 383, "capital": "Pristina", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".xk", "native": "Republika e Kosovës", "region": "Europe", "subregion": "Eastern Europe", "latitude": "42.56129090", "longitude": "20.34030350", "emoji": "🇽🇰" }, { "id": 117, "name": "Kuwait", "iso3": "KWT", "iso2": "KW", "numeric_code": "414", "phone_code": 965, "capital": "Kuwait City", "currency": "KWD", "currency_name": "Kuwaiti dinar", "currency_symbol": "ك.د", "tld": ".kw", "native": "الكويت", "region": "Asia", "subregion": "Western Asia", "latitude": "29.50000000", "longitude": "45.75000000", "emoji": "🇰🇼" }, { "id": 118, "name": "Kyrgyzstan", "iso3": "KGZ", "iso2": "KG", "numeric_code": "417", "phone_code": 996, "capital": "Bishkek", "currency": "KGS", "currency_name": "Kyrgyzstani som", "currency_symbol": "лв", "tld": ".kg", "native": "Кыргызстан", "region": "Asia", "subregion": "Central Asia", "latitude": "41.00000000", "longitude": "75.00000000", "emoji": "🇰🇬" }, { "id": 119, "name": "Laos", "iso3": "LAO", "iso2": "LA", "numeric_code": "418", "phone_code": 856, "capital": "Vientiane", "currency": "LAK", "currency_name": "Lao kip", "currency_symbol": "₭", "tld": ".la", "native": "ສປປລາວ", "region": "Asia", "subregion": "South-Eastern Asia", "latitude": "18.00000000", "longitude": "105.00000000", "emoji": "🇱🇦" }, { "id": 120, "name": "Latvia", "iso3": "LVA", "iso2": "LV", "numeric_code": "428", "phone_code": 371, "capital": "Riga", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".lv", "native": "Latvija", "region": "Europe", "subregion": "Northern Europe", "latitude": "57.00000000", "longitude": "25.00000000", "emoji": "🇱🇻" }, { "id": 121, "name": "Lebanon", "iso3": "LBN", "iso2": "LB", "numeric_code": "422", "phone_code": 961, "capital": "Beirut", "currency": "LBP", "currency_name": "Lebanese pound", "currency_symbol": "£", "tld": ".lb", "native": "لبنان", "region": "Asia", "subregion": "Western Asia", "latitude": "33.83333333", "longitude": "35.83333333", "emoji": "🇱🇧" }, { "id": 122, "name": "Lesotho", "iso3": "LSO", "iso2": "LS", "numeric_code": "426", "phone_code": 266, "capital": "Maseru", "currency": "LSL", "currency_name": "Lesotho loti", "currency_symbol": "L", "tld": ".ls", "native": "Lesotho", "region": "Africa", "subregion": "Southern Africa", "latitude": "-29.50000000", "longitude": "28.50000000", "emoji": "🇱🇸" }, { "id": 123, "name": "Liberia", "iso3": "LBR", "iso2": "LR", "numeric_code": "430", "phone_code": 231, "capital": "Monrovia", "currency": "LRD", "currency_name": "Liberian dollar", "currency_symbol": "$", "tld": ".lr", "native": "Liberia", "region": "Africa", "subregion": "Western Africa", "latitude": "6.50000000", "longitude": "-9.50000000", "emoji": "🇱🇷" }, { "id": 124, "name": "Libya", "iso3": "LBY", "iso2": "LY", "numeric_code": "434", "phone_code": 218, "capital": "Tripolis", "currency": "LYD", "currency_name": "Libyan dinar", "currency_symbol": "د.ل", "tld": ".ly", "native": "‏ليبيا", "region": "Africa", "subregion": "Northern Africa", "latitude": "25.00000000", "longitude": "17.00000000", "emoji": "🇱🇾" }, { "id": 125, "name": "Liechtenstein", "iso3": "LIE", "iso2": "LI", "numeric_code": "438", "phone_code": 423, "capital": "Vaduz", "currency": "CHF", "currency_name": "Swiss franc", "currency_symbol": "CHf", "tld": ".li", "native": "Liechtenstein", "region": "Europe", "subregion": "Western Europe", "latitude": "47.26666666", "longitude": "9.53333333", "emoji": "🇱🇮" }, { "id": 126, "name": "Lithuania", "iso3": "LTU", "iso2": "LT", "numeric_code": "440", "phone_code": 370, "capital": "Vilnius", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".lt", "native": "Lietuva", "region": "Europe", "subregion": "Northern Europe", "latitude": "56.00000000", "longitude": "24.00000000", "emoji": "🇱🇹" }, { "id": 127, "name": "Luxembourg", "iso3": "LUX", "iso2": "LU", "numeric_code": "442", "phone_code": 352, "capital": "Luxembourg", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".lu", "native": "Luxembourg", "region": "Europe", "subregion": "Western Europe", "latitude": "49.75000000", "longitude": "6.16666666", "emoji": "🇱🇺" }, { "id": 128, "name": "Macau S.A.R.", "iso3": "MAC", "iso2": "MO", "numeric_code": "446", "phone_code": 853, "capital": "Macao", "currency": "MOP", "currency_name": "Macanese pataca", "currency_symbol": "$", "tld": ".mo", "native": "澳門", "region": "Asia", "subregion": "Eastern Asia", "latitude": "22.16666666", "longitude": "113.55000000", "emoji": "🇲🇴" }, { "id": 129, "name": "Macedonia", "iso3": "MKD", "iso2": "MK", "numeric_code": "807", "phone_code": 389, "capital": "Skopje", "currency": "MKD", "currency_name": "Denar", "currency_symbol": "ден", "tld": ".mk", "native": "Северна Македонија", "region": "Europe", "subregion": "Southern Europe", "latitude": "41.83333333", "longitude": "22.00000000", "emoji": "🇲🇰" }, { "id": 130, "name": "Madagascar", "iso3": "MDG", "iso2": "MG", "numeric_code": "450", "phone_code": 261, "capital": "Antananarivo", "currency": "MGA", "currency_name": "Malagasy ariary", "currency_symbol": "Ar", "tld": ".mg", "native": "Madagasikara", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-20.00000000", "longitude": "47.00000000", "emoji": "🇲🇬" }, { "id": 131, "name": "Malawi", "iso3": "MWI", "iso2": "MW", "numeric_code": "454", "phone_code": 265, "capital": "Lilongwe", "currency": "MWK", "currency_name": "Malawian kwacha", "currency_symbol": "MK", "tld": ".mw", "native": "Malawi", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-13.50000000", "longitude": "34.00000000", "emoji": "🇲🇼" }, { "id": 132, "name": "Malaysia", "iso3": "MYS", "iso2": "MY", "numeric_code": "458", "phone_code": 60, "capital": "Kuala Lumpur", "currency": "MYR", "currency_name": "Malaysian ringgit", "currency_symbol": "RM", "tld": ".my", "native": "Malaysia", "region": "Asia", "subregion": "South-Eastern Asia", "latitude": "2.50000000", "longitude": "112.50000000", "emoji": "🇲🇾" }, { "id": 133, "name": "Maldives", "iso3": "MDV", "iso2": "MV", "numeric_code": "462", "phone_code": 960, "capital": "Male", "currency": "MVR", "currency_name": "Maldivian rufiyaa", "currency_symbol": "Rf", "tld": ".mv", "native": "Maldives", "region": "Asia", "subregion": "Southern Asia", "latitude": "3.25000000", "longitude": "73.00000000", "emoji": "🇲🇻" }, { "id": 134, "name": "Mali", "iso3": "MLI", "iso2": "ML", "numeric_code": "466", "phone_code": 223, "capital": "Bamako", "currency": "XOF", "currency_name": "West African CFA franc", "currency_symbol": "CFA", "tld": ".ml", "native": "Mali", "region": "Africa", "subregion": "Western Africa", "latitude": "17.00000000", "longitude": "-4.00000000", "emoji": "🇲🇱" }, { "id": 135, "name": "Malta", "iso3": "MLT", "iso2": "MT", "numeric_code": "470", "phone_code": 356, "capital": "Valletta", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".mt", "native": "Malta", "region": "Europe", "subregion": "Southern Europe", "latitude": "35.83333333", "longitude": "14.58333333", "emoji": "🇲🇹" }, { "id": 136, "name": "Man (Isle of)", "iso3": "IMN", "iso2": "IM", "numeric_code": "833", "phone_code": 44, "capital": "Douglas, Isle of Man", "currency": "GBP", "currency_name": "British pound", "currency_symbol": "£", "tld": ".im", "native": "Isle of Man", "region": "Europe", "subregion": "Northern Europe", "latitude": "54.25000000", "longitude": "-4.50000000", "emoji": "🇮🇲" }, { "id": 137, "name": "Marshall Islands", "iso3": "MHL", "iso2": "MH", "numeric_code": "584", "phone_code": 692, "capital": "Majuro", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".mh", "native": "M̧ajeļ", "region": "Oceania", "subregion": "Micronesia", "latitude": "9.00000000", "longitude": "168.00000000", "emoji": "🇲🇭" }, { "id": 138, "name": "Martinique", "iso3": "MTQ", "iso2": "MQ", "numeric_code": "474", "phone_code": 596, "capital": "Fort-de-France", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".mq", "native": "Martinique", "region": "Americas", "subregion": "Caribbean", "latitude": "14.66666700", "longitude": "-61.00000000", "emoji": "🇲🇶" }, { "id": 139, "name": "Mauritania", "iso3": "MRT", "iso2": "MR", "numeric_code": "478", "phone_code": 222, "capital": "Nouakchott", "currency": "MRO", "currency_name": "Mauritanian ouguiya", "currency_symbol": "MRU", "tld": ".mr", "native": "موريتانيا", "region": "Africa", "subregion": "Western Africa", "latitude": "20.00000000", "longitude": "-12.00000000", "emoji": "🇲🇷" }, { "id": 140, "name": "Mauritius", "iso3": "MUS", "iso2": "MU", "numeric_code": "480", "phone_code": 230, "capital": "Port Louis", "currency": "MUR", "currency_name": "Mauritian rupee", "currency_symbol": "₨", "tld": ".mu", "native": "Maurice", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-20.28333333", "longitude": "57.55000000", "emoji": "🇲🇺" }, { "id": 141, "name": "Mayotte", "iso3": "MYT", "iso2": "YT", "numeric_code": "175", "phone_code": 262, "capital": "Mamoudzou", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".yt", "native": "Mayotte", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-12.83333333", "longitude": "45.16666666", "emoji": "🇾🇹" }, { "id": 142, "name": "Mexico", "iso3": "MEX", "iso2": "MX", "numeric_code": "484", "phone_code": 52, "capital": "Ciudad de México", "currency": "MXN", "currency_name": "Mexican peso", "currency_symbol": "$", "tld": ".mx", "native": "México", "region": "Americas", "subregion": "Central America", "latitude": "23.00000000", "longitude": "-102.00000000", "emoji": "🇲🇽" }, { "id": 143, "name": "Micronesia", "iso3": "FSM", "iso2": "FM", "numeric_code": "583", "phone_code": 691, "capital": "Palikir", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".fm", "native": "Micronesia", "region": "Oceania", "subregion": "Micronesia", "latitude": "6.91666666", "longitude": "158.25000000", "emoji": "🇫🇲" }, { "id": 144, "name": "Moldova", "iso3": "MDA", "iso2": "MD", "numeric_code": "498", "phone_code": 373, "capital": "Chisinau", "currency": "MDL", "currency_name": "Moldovan leu", "currency_symbol": "L", "tld": ".md", "native": "Moldova", "region": "Europe", "subregion": "Eastern Europe", "latitude": "47.00000000", "longitude": "29.00000000", "emoji": "🇲🇩" }, { "id": 145, "name": "Monaco", "iso3": "MCO", "iso2": "MC", "numeric_code": "492", "phone_code": 377, "capital": "Monaco", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".mc", "native": "Monaco", "region": "Europe", "subregion": "Western Europe", "latitude": "43.73333333", "longitude": "7.40000000", "emoji": "🇲🇨" }, { "id": 146, "name": "Mongolia", "iso3": "MNG", "iso2": "MN", "numeric_code": "496", "phone_code": 976, "capital": "Ulan Bator", "currency": "MNT", "currency_name": "Mongolian tögrög", "currency_symbol": "₮", "tld": ".mn", "native": "Монгол улс", "region": "Asia", "subregion": "Eastern Asia", "latitude": "46.00000000", "longitude": "105.00000000", "emoji": "🇲🇳" }, { "id": 147, "name": "Montenegro", "iso3": "MNE", "iso2": "ME", "numeric_code": "499", "phone_code": 382, "capital": "Podgorica", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".me", "native": "Црна Гора", "region": "Europe", "subregion": "Southern Europe", "latitude": "42.50000000", "longitude": "19.30000000", "emoji": "🇲🇪" }, { "id": 148, "name": "Montserrat", "iso3": "MSR", "iso2": "MS", "numeric_code": "500", "phone_code": 1, "capital": "Plymouth", "currency": "XCD", "currency_name": "Eastern Caribbean dollar", "currency_symbol": "$", "tld": ".ms", "native": "Montserrat", "region": "Americas", "subregion": "Caribbean", "latitude": "16.75000000", "longitude": "-62.20000000", "emoji": "🇲🇸" }, { "id": 149, "name": "Morocco", "iso3": "MAR", "iso2": "MA", "numeric_code": "504", "phone_code": 212, "capital": "Rabat", "currency": "MAD", "currency_name": "Moroccan dirham", "currency_symbol": "DH", "tld": ".ma", "native": "المغرب", "region": "Africa", "subregion": "Northern Africa", "latitude": "32.00000000", "longitude": "-5.00000000", "emoji": "🇲🇦" }, { "id": 150, "name": "Mozambique", "iso3": "MOZ", "iso2": "MZ", "numeric_code": "508", "phone_code": 258, "capital": "Maputo", "currency": "MZN", "currency_name": "Mozambican metical", "currency_symbol": "MT", "tld": ".mz", "native": "Moçambique", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-18.25000000", "longitude": "35.00000000", "emoji": "🇲🇿" }, { "id": 151, "name": "Myanmar", "iso3": "MMR", "iso2": "MM", "numeric_code": "104", "phone_code": 95, "capital": "Nay Pyi Taw", "currency": "MMK", "currency_name": "Burmese kyat", "currency_symbol": "K", "tld": ".mm", "native": "မြန်မာ", "region": "Asia", "subregion": "South-Eastern Asia", "latitude": "22.00000000", "longitude": "98.00000000", "emoji": "🇲🇲" }, { "id": 152, "name": "Namibia", "iso3": "NAM", "iso2": "NA", "numeric_code": "516", "phone_code": 264, "capital": "Windhoek", "currency": "NAD", "currency_name": "Namibian dollar", "currency_symbol": "$", "tld": ".na", "native": "Namibia", "region": "Africa", "subregion": "Southern Africa", "latitude": "-22.00000000", "longitude": "17.00000000", "emoji": "🇳🇦" }, { "id": 153, "name": "Nauru", "iso3": "NRU", "iso2": "NR", "numeric_code": "520", "phone_code": 674, "capital": "Yaren", "currency": "AUD", "currency_name": "Australian dollar", "currency_symbol": "$", "tld": ".nr", "native": "Nauru", "region": "Oceania", "subregion": "Micronesia", "latitude": "-0.53333333", "longitude": "166.91666666", "emoji": "🇳🇷" }, { "id": 154, "name": "Nepal", "iso3": "NPL", "iso2": "NP", "numeric_code": "524", "phone_code": 977, "capital": "Kathmandu", "currency": "NPR", "currency_name": "Nepalese rupee", "currency_symbol": "₨", "tld": ".np", "native": "नपल", "region": "Asia", "subregion": "Southern Asia", "latitude": "28.00000000", "longitude": "84.00000000", "emoji": "🇳🇵" }, { "id": 156, "name": "Netherlands", "iso3": "NLD", "iso2": "NL", "numeric_code": "528", "phone_code": 31, "capital": "Amsterdam", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".nl", "native": "Nederland", "region": "Europe", "subregion": "Western Europe", "latitude": "52.50000000", "longitude": "5.75000000", "emoji": "🇳🇱" }, { "id": 157, "name": "New Caledonia", "iso3": "NCL", "iso2": "NC", "numeric_code": "540", "phone_code": 687, "capital": "Noumea", "currency": "XPF", "currency_name": "CFP franc", "currency_symbol": "₣", "tld": ".nc", "native": "Nouvelle-Calédonie", "region": "Oceania", "subregion": "Melanesia", "latitude": "-21.50000000", "longitude": "165.50000000", "emoji": "🇳🇨" }, { "id": 158, "name": "New Zealand", "iso3": "NZL", "iso2": "NZ", "numeric_code": "554", "phone_code": 64, "capital": "Wellington", "currency": "NZD", "currency_name": "New Zealand dollar", "currency_symbol": "$", "tld": ".nz", "native": "New Zealand", "region": "Oceania", "subregion": "Australia and New Zealand", "latitude": "-41.00000000", "longitude": "174.00000000", "emoji": "🇳🇿" }, { "id": 159, "name": "Nicaragua", "iso3": "NIC", "iso2": "NI", "numeric_code": "558", "phone_code": 505, "capital": "Managua", "currency": "NIO", "currency_name": "Nicaraguan córdoba", "currency_symbol": "C$", "tld": ".ni", "native": "Nicaragua", "region": "Americas", "subregion": "Central America", "latitude": "13.00000000", "longitude": "-85.00000000", "emoji": "🇳🇮" }, { "id": 160, "name": "Niger", "iso3": "NER", "iso2": "NE", "numeric_code": "562", "phone_code": 227, "capital": "Niamey", "currency": "XOF", "currency_name": "West African CFA franc", "currency_symbol": "CFA", "tld": ".ne", "native": "Niger", "region": "Africa", "subregion": "Western Africa", "latitude": "16.00000000", "longitude": "8.00000000", "emoji": "🇳🇪" }, { "id": 161, "name": "Nigeria", "iso3": "NGA", "iso2": "NG", "numeric_code": "566", "phone_code": 234, "capital": "Abuja", "currency": "NGN", "currency_name": "Nigerian naira", "currency_symbol": "₦", "tld": ".ng", "native": "Nigeria", "region": "Africa", "subregion": "Western Africa", "latitude": "10.00000000", "longitude": "8.00000000", "emoji": "🇳🇬" }, { "id": 162, "name": "Niue", "iso3": "NIU", "iso2": "NU", "numeric_code": "570", "phone_code": 683, "capital": "Alofi", "currency": "NZD", "currency_name": "New Zealand dollar", "currency_symbol": "$", "tld": ".nu", "native": "Niuē", "region": "Oceania", "subregion": "Polynesia", "latitude": "-19.03333333", "longitude": "-169.86666666", "emoji": "🇳🇺" }, { "id": 163, "name": "Norfolk Island", "iso3": "NFK", "iso2": "NF", "numeric_code": "574", "phone_code": 672, "capital": "Kingston", "currency": "AUD", "currency_name": "Australian dollar", "currency_symbol": "$", "tld": ".nf", "native": "Norfolk Island", "region": "Oceania", "subregion": "Australia and New Zealand", "latitude": "-29.03333333", "longitude": "167.95000000", "emoji": "🇳🇫" }, { "id": 115, "name": "North Korea", "iso3": "PRK", "iso2": "KP", "numeric_code": "408", "phone_code": 850, "capital": "Pyongyang", "currency": "KPW", "currency_name": "North Korean Won", "currency_symbol": "₩", "tld": ".kp", "native": "북한", "region": "Asia", "subregion": "Eastern Asia", "latitude": "40.00000000", "longitude": "127.00000000", "emoji": "🇰🇵" }, { "id": 164, "name": "Northern Mariana Islands", "iso3": "MNP", "iso2": "MP", "numeric_code": "580", "phone_code": 1, "capital": "Saipan", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".mp", "native": "Northern Mariana Islands", "region": "Oceania", "subregion": "Micronesia", "latitude": "15.20000000", "longitude": "145.75000000", "emoji": "🇲🇵" }, { "id": 165, "name": "Norway", "iso3": "NOR", "iso2": "NO", "numeric_code": "578", "phone_code": 47, "capital": "Oslo", "currency": "NOK", "currency_name": "Norwegian krone", "currency_symbol": "kr", "tld": ".no", "native": "Norge", "region": "Europe", "subregion": "Northern Europe", "latitude": "62.00000000", "longitude": "10.00000000", "emoji": "🇳🇴" }, { "id": 166, "name": "Oman", "iso3": "OMN", "iso2": "OM", "numeric_code": "512", "phone_code": 968, "capital": "Muscat", "currency": "OMR", "currency_name": "Omani rial", "currency_symbol": ".ع.ر", "tld": ".om", "native": "عمان", "region": "Asia", "subregion": "Western Asia", "latitude": "21.00000000", "longitude": "57.00000000", "emoji": "🇴🇲" }, { "id": 167, "name": "Pakistan", "iso3": "PAK", "iso2": "PK", "numeric_code": "586", "phone_code": 92, "capital": "Islamabad", "currency": "PKR", "currency_name": "Pakistani rupee", "currency_symbol": "₨", "tld": ".pk", "native": "Pakistan", "region": "Asia", "subregion": "Southern Asia", "latitude": "30.00000000", "longitude": "70.00000000", "emoji": "🇵🇰" }, { "id": 168, "name": "Palau", "iso3": "PLW", "iso2": "PW", "numeric_code": "585", "phone_code": 680, "capital": "Melekeok", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".pw", "native": "Palau", "region": "Oceania", "subregion": "Micronesia", "latitude": "7.50000000", "longitude": "134.50000000", "emoji": "🇵🇼" }, { "id": 169, "name": "Palestinian Territory Occupied", "iso3": "PSE", "iso2": "PS", "numeric_code": "275", "phone_code": 970, "capital": "East Jerusalem", "currency": "ILS", "currency_name": "Israeli new shekel", "currency_symbol": "₪", "tld": ".ps", "native": "فلسطين", "region": "Asia", "subregion": "Western Asia", "latitude": "31.90000000", "longitude": "35.20000000", "emoji": "🇵🇸" }, { "id": 170, "name": "Panama", "iso3": "PAN", "iso2": "PA", "numeric_code": "591", "phone_code": 507, "capital": "Panama City", "currency": "PAB", "currency_name": "Panamanian balboa", "currency_symbol": "B/.", "tld": ".pa", "native": "Panamá", "region": "Americas", "subregion": "Central America", "latitude": "9.00000000", "longitude": "-80.00000000", "emoji": "🇵🇦" }, { "id": 171, "name": "Papua new Guinea", "iso3": "PNG", "iso2": "PG", "numeric_code": "598", "phone_code": 675, "capital": "Port Moresby", "currency": "PGK", "currency_name": "Papua New Guinean kina", "currency_symbol": "K", "tld": ".pg", "native": "Papua Niugini", "region": "Oceania", "subregion": "Melanesia", "latitude": "-6.00000000", "longitude": "147.00000000", "emoji": "🇵🇬" }, { "id": 172, "name": "Paraguay", "iso3": "PRY", "iso2": "PY", "numeric_code": "600", "phone_code": 595, "capital": "Asuncion", "currency": "PYG", "currency_name": "Paraguayan guarani", "currency_symbol": "₲", "tld": ".py", "native": "Paraguay", "region": "Americas", "subregion": "South America", "latitude": "-23.00000000", "longitude": "-58.00000000", "emoji": "🇵🇾" }, { "id": 173, "name": "Peru", "iso3": "PER", "iso2": "PE", "numeric_code": "604", "phone_code": 51, "capital": "Lima", "currency": "PEN", "currency_name": "Peruvian sol", "currency_symbol": "S/.", "tld": ".pe", "native": "Perú", "region": "Americas", "subregion": "South America", "latitude": "-10.00000000", "longitude": "-76.00000000", "emoji": "🇵🇪" }, { "id": 174, "name": "Philippines", "iso3": "PHL", "iso2": "PH", "numeric_code": "608", "phone_code": 63, "capital": "Manila", "currency": "PHP", "currency_name": "Philippine peso", "currency_symbol": "₱", "tld": ".ph", "native": "Pilipinas", "region": "Asia", "subregion": "South-Eastern Asia", "latitude": "13.00000000", "longitude": "122.00000000", "emoji": "🇵🇭" }, { "id": 175, "name": "Pitcairn Island", "iso3": "PCN", "iso2": "PN", "numeric_code": "612", "phone_code": 870, "capital": "Adamstown", "currency": "NZD", "currency_name": "New Zealand dollar", "currency_symbol": "$", "tld": ".pn", "native": "Pitcairn Islands", "region": "Oceania", "subregion": "Polynesia", "latitude": "-25.06666666", "longitude": "-130.10000000", "emoji": "🇵🇳" }, { "id": 176, "name": "Poland", "iso3": "POL", "iso2": "PL", "numeric_code": "616", "phone_code": 48, "capital": "Warsaw", "currency": "PLN", "currency_name": "Polish złoty", "currency_symbol": "zł", "tld": ".pl", "native": "Polska", "region": "Europe", "subregion": "Eastern Europe", "latitude": "52.00000000", "longitude": "20.00000000", "emoji": "🇵🇱" }, { "id": 177, "name": "Portugal", "iso3": "PRT", "iso2": "PT", "numeric_code": "620", "phone_code": 351, "capital": "Lisbon", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".pt", "native": "Portugal", "region": "Europe", "subregion": "Southern Europe", "latitude": "39.50000000", "longitude": "-8.00000000", "emoji": "🇵🇹" }, { "id": 178, "name": "Puerto Rico", "iso3": "PRI", "iso2": "PR", "numeric_code": "630", "phone_code": 1, "capital": "San Juan", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".pr", "native": "Puerto Rico", "region": "Americas", "subregion": "Caribbean", "latitude": "18.25000000", "longitude": "-66.50000000", "emoji": "🇵🇷" }, { "id": 179, "name": "Qatar", "iso3": "QAT", "iso2": "QA", "numeric_code": "634", "phone_code": 974, "capital": "Doha", "currency": "QAR", "currency_name": "Qatari riyal", "currency_symbol": "ق.ر", "tld": ".qa", "native": "قطر", "region": "Asia", "subregion": "Western Asia", "latitude": "25.50000000", "longitude": "51.25000000", "emoji": "🇶🇦" }, { "id": 180, "name": "Reunion", "iso3": "REU", "iso2": "RE", "numeric_code": "638", "phone_code": 262, "capital": "Saint-Denis", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".re", "native": "La Réunion", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-21.15000000", "longitude": "55.50000000", "emoji": "🇷🇪" }, { "id": 181, "name": "Romania", "iso3": "ROU", "iso2": "RO", "numeric_code": "642", "phone_code": 40, "capital": "Bucharest", "currency": "RON", "currency_name": "Romanian leu", "currency_symbol": "lei", "tld": ".ro", "native": "România", "region": "Europe", "subregion": "Eastern Europe", "latitude": "46.00000000", "longitude": "25.00000000", "emoji": "🇷🇴" }, { "id": 182, "name": "Russia", "iso3": "RUS", "iso2": "RU", "numeric_code": "643", "phone_code": 7, "capital": "Moscow", "currency": "RUB", "currency_name": "Russian ruble", "currency_symbol": "₽", "tld": ".ru", "native": "Россия", "region": "Europe", "subregion": "Eastern Europe", "latitude": "60.00000000", "longitude": "100.00000000", "emoji": "🇷🇺" }, { "id": 183, "name": "Rwanda", "iso3": "RWA", "iso2": "RW", "numeric_code": "646", "phone_code": 250, "capital": "Kigali", "currency": "RWF", "currency_name": "Rwandan franc", "currency_symbol": "FRw", "tld": ".rw", "native": "Rwanda", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-2.00000000", "longitude": "30.00000000", "emoji": "🇷🇼" }, { "id": 184, "name": "Saint Helena", "iso3": "SHN", "iso2": "SH", "numeric_code": "654", "phone_code": 290, "capital": "Jamestown", "currency": "SHP", "currency_name": "Saint Helena pound", "currency_symbol": "£", "tld": ".sh", "native": "Saint Helena", "region": "Africa", "subregion": "Western Africa", "latitude": "-15.95000000", "longitude": "-5.70000000", "emoji": "🇸🇭" }, { "id": 185, "name": "Saint Kitts And Nevis", "iso3": "KNA", "iso2": "KN", "numeric_code": "659", "phone_code": 1, "capital": "Basseterre", "currency": "XCD", "currency_name": "Eastern Caribbean dollar", "currency_symbol": "$", "tld": ".kn", "native": "Saint Kitts and Nevis", "region": "Americas", "subregion": "Caribbean", "latitude": "17.33333333", "longitude": "-62.75000000", "emoji": "🇰🇳" }, { "id": 186, "name": "Saint Lucia", "iso3": "LCA", "iso2": "LC", "numeric_code": "662", "phone_code": 1, "capital": "Castries", "currency": "XCD", "currency_name": "Eastern Caribbean dollar", "currency_symbol": "$", "tld": ".lc", "native": "Saint Lucia", "region": "Americas", "subregion": "Caribbean", "latitude": "13.88333333", "longitude": "-60.96666666", "emoji": "🇱🇨" }, { "id": 187, "name": "Saint Pierre and Miquelon", "iso3": "SPM", "iso2": "PM", "numeric_code": "666", "phone_code": 508, "capital": "Saint-Pierre", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".pm", "native": "Saint-Pierre-et-Miquelon", "region": "Americas", "subregion": "Northern America", "latitude": "46.83333333", "longitude": "-56.33333333", "emoji": "🇵🇲" }, { "id": 188, "name": "Saint Vincent And The Grenadines", "iso3": "VCT", "iso2": "VC", "numeric_code": "670", "phone_code": 1, "capital": "Kingstown", "currency": "XCD", "currency_name": "Eastern Caribbean dollar", "currency_symbol": "$", "tld": ".vc", "native": "Saint Vincent and the Grenadines", "region": "Americas", "subregion": "Caribbean", "latitude": "13.25000000", "longitude": "-61.20000000", "emoji": "🇻🇨" }, { "id": 189, "name": "Saint-Barthelemy", "iso3": "BLM", "iso2": "BL", "numeric_code": "652", "phone_code": 590, "capital": "Gustavia", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".bl", "native": "Saint-Barthélemy", "region": "Americas", "subregion": "Caribbean", "latitude": "18.50000000", "longitude": "-63.41666666", "emoji": "🇧🇱" }, { "id": 190, "name": "Saint-Martin (French part)", "iso3": "MAF", "iso2": "MF", "numeric_code": "663", "phone_code": 590, "capital": "Marigot", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".mf", "native": "Saint-Martin", "region": "Americas", "subregion": "Caribbean", "latitude": "18.08333333", "longitude": "-63.95000000", "emoji": "🇲🇫" }, { "id": 191, "name": "Samoa", "iso3": "WSM", "iso2": "WS", "numeric_code": "882", "phone_code": 685, "capital": "Apia", "currency": "WST", "currency_name": "Samoan tālā", "currency_symbol": "SAT", "tld": ".ws", "native": "Samoa", "region": "Oceania", "subregion": "Polynesia", "latitude": "-13.58333333", "longitude": "-172.33333333", "emoji": "🇼🇸" }, { "id": 192, "name": "San Marino", "iso3": "SMR", "iso2": "SM", "numeric_code": "674", "phone_code": 378, "capital": "San Marino", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".sm", "native": "San Marino", "region": "Europe", "subregion": "Southern Europe", "latitude": "43.76666666", "longitude": "12.41666666", "emoji": "🇸🇲" }, { "id": 193, "name": "Sao Tome and Principe", "iso3": "STP", "iso2": "ST", "numeric_code": "678", "phone_code": 239, "capital": "Sao Tome", "currency": "STD", "currency_name": "Dobra", "currency_symbol": "Db", "tld": ".st", "native": "São Tomé e Príncipe", "region": "Africa", "subregion": "Middle Africa", "latitude": "1.00000000", "longitude": "7.00000000", "emoji": "🇸🇹" }, { "id": 194, "name": "Saudi Arabia", "iso3": "SAU", "iso2": "SA", "numeric_code": "682", "phone_code": 966, "capital": "Riyadh", "currency": "SAR", "currency_name": "Saudi riyal", "currency_symbol": "﷼", "tld": ".sa", "native": "المملكة العربية السعودية", "region": "Asia", "subregion": "Western Asia", "latitude": "25.00000000", "longitude": "45.00000000", "emoji": "🇸🇦" }, { "id": 195, "name": "Senegal", "iso3": "SEN", "iso2": "SN", "numeric_code": "686", "phone_code": 221, "capital": "Dakar", "currency": "XOF", "currency_name": "West African CFA franc", "currency_symbol": "CFA", "tld": ".sn", "native": "Sénégal", "region": "Africa", "subregion": "Western Africa", "latitude": "14.00000000", "longitude": "-14.00000000", "emoji": "🇸🇳" }, { "id": 196, "name": "Serbia", "iso3": "SRB", "iso2": "RS", "numeric_code": "688", "phone_code": 381, "capital": "Belgrade", "currency": "RSD", "currency_name": "Serbian dinar", "currency_symbol": "din", "tld": ".rs", "native": "Србија", "region": "Europe", "subregion": "Southern Europe", "latitude": "44.00000000", "longitude": "21.00000000", "emoji": "🇷🇸" }, { "id": 197, "name": "Seychelles", "iso3": "SYC", "iso2": "SC", "numeric_code": "690", "phone_code": 248, "capital": "Victoria", "currency": "SCR", "currency_name": "Seychellois rupee", "currency_symbol": "SRe", "tld": ".sc", "native": "Seychelles", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-4.58333333", "longitude": "55.66666666", "emoji": "🇸🇨" }, { "id": 198, "name": "Sierra Leone", "iso3": "SLE", "iso2": "SL", "numeric_code": "694", "phone_code": 232, "capital": "Freetown", "currency": "SLL", "currency_name": "Sierra Leonean leone", "currency_symbol": "Le", "tld": ".sl", "native": "Sierra Leone", "region": "Africa", "subregion": "Western Africa", "latitude": "8.50000000", "longitude": "-11.50000000", "emoji": "🇸🇱" }, { "id": 199, "name": "Singapore", "iso3": "SGP", "iso2": "SG", "numeric_code": "702", "phone_code": 65, "capital": "Singapur", "currency": "SGD", "currency_name": "Singapore dollar", "currency_symbol": "$", "tld": ".sg", "native": "Singapore", "region": "Asia", "subregion": "South-Eastern Asia", "latitude": "1.36666666", "longitude": "103.80000000", "emoji": "🇸🇬" }, { "id": 250, "name": "Sint Maarten (Dutch part)", "iso3": "SXM", "iso2": "SX", "numeric_code": "534", "phone_code": 1721, "capital": "Philipsburg", "currency": "ANG", "currency_name": "Netherlands Antillean guilder", "currency_symbol": "ƒ", "tld": ".sx", "native": "Sint Maarten", "region": "Americas", "subregion": "Caribbean", "latitude": "18.03333300", "longitude": "-63.05000000", "emoji": "🇸🇽" }, { "id": 200, "name": "Slovakia", "iso3": "SVK", "iso2": "SK", "numeric_code": "703", "phone_code": 421, "capital": "Bratislava", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".sk", "native": "Slovensko", "region": "Europe", "subregion": "Eastern Europe", "latitude": "48.66666666", "longitude": "19.50000000", "emoji": "🇸🇰" }, { "id": 201, "name": "Slovenia", "iso3": "SVN", "iso2": "SI", "numeric_code": "705", "phone_code": 386, "capital": "Ljubljana", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".si", "native": "Slovenija", "region": "Europe", "subregion": "Southern Europe", "latitude": "46.11666666", "longitude": "14.81666666", "emoji": "🇸🇮" }, { "id": 202, "name": "Solomon Islands", "iso3": "SLB", "iso2": "SB", "numeric_code": "090", "phone_code": 677, "capital": "Honiara", "currency": "SBD", "currency_name": "Solomon Islands dollar", "currency_symbol": "Si$", "tld": ".sb", "native": "Solomon Islands", "region": "Oceania", "subregion": "Melanesia", "latitude": "-8.00000000", "longitude": "159.00000000", "emoji": "🇸🇧" }, { "id": 203, "name": "Somalia", "iso3": "SOM", "iso2": "SO", "numeric_code": "706", "phone_code": 252, "capital": "Mogadishu", "currency": "SOS", "currency_name": "Somali shilling", "currency_symbol": "Sh.so.", "tld": ".so", "native": "Soomaaliya", "region": "Africa", "subregion": "Eastern Africa", "latitude": "10.00000000", "longitude": "49.00000000", "emoji": "🇸🇴" }, { "id": 204, "name": "South Africa", "iso3": "ZAF", "iso2": "ZA", "numeric_code": "710", "phone_code": 27, "capital": "Pretoria", "currency": "ZAR", "currency_name": "South African rand", "currency_symbol": "R", "tld": ".za", "native": "South Africa", "region": "Africa", "subregion": "Southern Africa", "latitude": "-29.00000000", "longitude": "24.00000000", "emoji": "🇿🇦" }, { "id": 205, "name": "South Georgia", "iso3": "SGS", "iso2": "GS", "numeric_code": "239", "phone_code": 500, "capital": "Grytviken", "currency": "GBP", "currency_name": "British pound", "currency_symbol": "£", "tld": ".gs", "native": "South Georgia", "region": "Americas", "subregion": "South America", "latitude": "-54.50000000", "longitude": "-37.00000000", "emoji": "🇬🇸" }, { "id": 116, "name": "South Korea", "iso3": "KOR", "iso2": "KR", "numeric_code": "410", "phone_code": 82, "capital": "Seoul", "currency": "KRW", "currency_name": "Won", "currency_symbol": "₩", "tld": ".kr", "native": "대한민국", "region": "Asia", "subregion": "Eastern Asia", "latitude": "37.00000000", "longitude": "127.50000000", "emoji": "🇰🇷" }, { "id": 206, "name": "South Sudan", "iso3": "SSD", "iso2": "SS", "numeric_code": "728", "phone_code": 211, "capital": "Juba", "currency": "SSP", "currency_name": "South Sudanese pound", "currency_symbol": "£", "tld": ".ss", "native": "South Sudan", "region": "Africa", "subregion": "Middle Africa", "latitude": "7.00000000", "longitude": "30.00000000", "emoji": "🇸🇸" }, { "id": 207, "name": "Spain", "iso3": "ESP", "iso2": "ES", "numeric_code": "724", "phone_code": 34, "capital": "Madrid", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".es", "native": "España", "region": "Europe", "subregion": "Southern Europe", "latitude": "40.00000000", "longitude": "-4.00000000", "emoji": "🇪🇸" }, { "id": 208, "name": "Sri Lanka", "iso3": "LKA", "iso2": "LK", "numeric_code": "144", "phone_code": 94, "capital": "Colombo", "currency": "LKR", "currency_name": "Sri Lankan rupee", "currency_symbol": "Rs", "tld": ".lk", "native": "śrī laṃkāva", "region": "Asia", "subregion": "Southern Asia", "latitude": "7.00000000", "longitude": "81.00000000", "emoji": "🇱🇰" }, { "id": 209, "name": "Sudan", "iso3": "SDN", "iso2": "SD", "numeric_code": "729", "phone_code": 249, "capital": "Khartoum", "currency": "SDG", "currency_name": "Sudanese pound", "currency_symbol": ".س.ج", "tld": ".sd", "native": "السودان", "region": "Africa", "subregion": "Northern Africa", "latitude": "15.00000000", "longitude": "30.00000000", "emoji": "🇸🇩" }, { "id": 210, "name": "Suriname", "iso3": "SUR", "iso2": "SR", "numeric_code": "740", "phone_code": 597, "capital": "Paramaribo", "currency": "SRD", "currency_name": "Surinamese dollar", "currency_symbol": "$", "tld": ".sr", "native": "Suriname", "region": "Americas", "subregion": "South America", "latitude": "4.00000000", "longitude": "-56.00000000", "emoji": "🇸🇷" }, { "id": 211, "name": "Svalbard And Jan Mayen Islands", "iso3": "SJM", "iso2": "SJ", "numeric_code": "744", "phone_code": 47, "capital": "Longyearbyen", "currency": "NOK", "currency_name": "Norwegian Krone", "currency_symbol": "kr", "tld": ".sj", "native": "Svalbard og Jan Mayen", "region": "Europe", "subregion": "Northern Europe", "latitude": "78.00000000", "longitude": "20.00000000", "emoji": "🇸🇯" }, { "id": 212, "name": "Swaziland", "iso3": "SWZ", "iso2": "SZ", "numeric_code": "748", "phone_code": 268, "capital": "Mbabane", "currency": "SZL", "currency_name": "Lilangeni", "currency_symbol": "E", "tld": ".sz", "native": "Swaziland", "region": "Africa", "subregion": "Southern Africa", "latitude": "-26.50000000", "longitude": "31.50000000", "emoji": "🇸🇿" }, { "id": 213, "name": "Sweden", "iso3": "SWE", "iso2": "SE", "numeric_code": "752", "phone_code": 46, "capital": "Stockholm", "currency": "SEK", "currency_name": "Swedish krona", "currency_symbol": "kr", "tld": ".se", "native": "Sverige", "region": "Europe", "subregion": "Northern Europe", "latitude": "62.00000000", "longitude": "15.00000000", "emoji": "🇸🇪" }, { "id": 214, "name": "Switzerland", "iso3": "CHE", "iso2": "CH", "numeric_code": "756", "phone_code": 41, "capital": "Bern", "currency": "CHF", "currency_name": "Swiss franc", "currency_symbol": "CHf", "tld": ".ch", "native": "Schweiz", "region": "Europe", "subregion": "Western Europe", "latitude": "47.00000000", "longitude": "8.00000000", "emoji": "🇨🇭" }, { "id": 215, "name": "Syria", "iso3": "SYR", "iso2": "SY", "numeric_code": "760", "phone_code": 963, "capital": "Damascus", "currency": "SYP", "currency_name": "Syrian pound", "currency_symbol": "LS", "tld": ".sy", "native": "سوريا", "region": "Asia", "subregion": "Western Asia", "latitude": "35.00000000", "longitude": "38.00000000", "emoji": "🇸🇾" }, { "id": 216, "name": "Taiwan", "iso3": "TWN", "iso2": "TW", "numeric_code": "158", "phone_code": 886, "capital": "Taipei", "currency": "TWD", "currency_name": "New Taiwan dollar", "currency_symbol": "$", "tld": ".tw", "native": "臺灣", "region": "Asia", "subregion": "Eastern Asia", "latitude": "23.50000000", "longitude": "121.00000000", "emoji": "🇹🇼" }, { "id": 217, "name": "Tajikistan", "iso3": "TJK", "iso2": "TJ", "numeric_code": "762", "phone_code": 992, "capital": "Dushanbe", "currency": "TJS", "currency_name": "Tajikistani somoni", "currency_symbol": "SM", "tld": ".tj", "native": "Тоҷикистон", "region": "Asia", "subregion": "Central Asia", "latitude": "39.00000000", "longitude": "71.00000000", "emoji": "🇹🇯" }, { "id": 218, "name": "Tanzania", "iso3": "TZA", "iso2": "TZ", "numeric_code": "834", "phone_code": 255, "capital": "Dodoma", "currency": "TZS", "currency_name": "Tanzanian shilling", "currency_symbol": "TSh", "tld": ".tz", "native": "Tanzania", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-6.00000000", "longitude": "35.00000000", "emoji": "🇹🇿" }, { "id": 219, "name": "Thailand", "iso3": "THA", "iso2": "TH", "numeric_code": "764", "phone_code": 66, "capital": "Bangkok", "currency": "THB", "currency_name": "Thai baht", "currency_symbol": "฿", "tld": ".th", "native": "ประเทศไทย", "region": "Asia", "subregion": "South-Eastern Asia", "latitude": "15.00000000", "longitude": "100.00000000", "emoji": "🇹🇭" }, { "id": 17, "name": "The Bahamas", "iso3": "BHS", "iso2": "BS", "numeric_code": "044", "phone_code": 1, "capital": "Nassau", "currency": "BSD", "currency_name": "Bahamian dollar", "currency_symbol": "B$", "tld": ".bs", "native": "Bahamas", "region": "Americas", "subregion": "Caribbean", "latitude": "24.25000000", "longitude": "-76.00000000", "emoji": "🇧🇸" }, { "id": 220, "name": "Togo", "iso3": "TGO", "iso2": "TG", "numeric_code": "768", "phone_code": 228, "capital": "Lome", "currency": "XOF", "currency_name": "West African CFA franc", "currency_symbol": "CFA", "tld": ".tg", "native": "Togo", "region": "Africa", "subregion": "Western Africa", "latitude": "8.00000000", "longitude": "1.16666666", "emoji": "🇹🇬" }, { "id": 221, "name": "Tokelau", "iso3": "TKL", "iso2": "TK", "numeric_code": "772", "phone_code": 690, "capital": "", "currency": "NZD", "currency_name": "New Zealand dollar", "currency_symbol": "$", "tld": ".tk", "native": "Tokelau", "region": "Oceania", "subregion": "Polynesia", "latitude": "-9.00000000", "longitude": "-172.00000000", "emoji": "🇹🇰" }, { "id": 222, "name": "Tonga", "iso3": "TON", "iso2": "TO", "numeric_code": "776", "phone_code": 676, "capital": "Nuku'alofa", "currency": "TOP", "currency_name": "Tongan paʻanga", "currency_symbol": "$", "tld": ".to", "native": "Tonga", "region": "Oceania", "subregion": "Polynesia", "latitude": "-20.00000000", "longitude": "-175.00000000", "emoji": "🇹🇴" }, { "id": 223, "name": "Trinidad And Tobago", "iso3": "TTO", "iso2": "TT", "numeric_code": "780", "phone_code": 1, "capital": "Port of Spain", "currency": "TTD", "currency_name": "Trinidad and Tobago dollar", "currency_symbol": "$", "tld": ".tt", "native": "Trinidad and Tobago", "region": "Americas", "subregion": "Caribbean", "latitude": "11.00000000", "longitude": "-61.00000000", "emoji": "🇹🇹" }, { "id": 224, "name": "Tunisia", "iso3": "TUN", "iso2": "TN", "numeric_code": "788", "phone_code": 216, "capital": "Tunis", "currency": "TND", "currency_name": "Tunisian dinar", "currency_symbol": "ت.د", "tld": ".tn", "native": "تونس", "region": "Africa", "subregion": "Northern Africa", "latitude": "34.00000000", "longitude": "9.00000000", "emoji": "🇹🇳" }, { "id": 225, "name": "Turkey", "iso3": "TUR", "iso2": "TR", "numeric_code": "792", "phone_code": 90, "capital": "Ankara", "currency": "TRY", "currency_name": "Turkish lira", "currency_symbol": "₺", "tld": ".tr", "native": "Türkiye", "region": "Asia", "subregion": "Western Asia", "latitude": "39.00000000", "longitude": "35.00000000", "emoji": "🇹🇷" }, { "id": 226, "name": "Turkmenistan", "iso3": "TKM", "iso2": "TM", "numeric_code": "795", "phone_code": 993, "capital": "Ashgabat", "currency": "TMT", "currency_name": "Turkmenistan manat", "currency_symbol": "T", "tld": ".tm", "native": "Türkmenistan", "region": "Asia", "subregion": "Central Asia", "latitude": "40.00000000", "longitude": "60.00000000", "emoji": "🇹🇲" }, { "id": 227, "name": "Turks And Caicos Islands", "iso3": "TCA", "iso2": "TC", "numeric_code": "796", "phone_code": 1, "capital": "Cockburn Town", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".tc", "native": "Turks and Caicos Islands", "region": "Americas", "subregion": "Caribbean", "latitude": "21.75000000", "longitude": "-71.58333333", "emoji": "🇹🇨" }, { "id": 228, "name": "Tuvalu", "iso3": "TUV", "iso2": "TV", "numeric_code": "798", "phone_code": 688, "capital": "Funafuti", "currency": "AUD", "currency_name": "Australian dollar", "currency_symbol": "$", "tld": ".tv", "native": "Tuvalu", "region": "Oceania", "subregion": "Polynesia", "latitude": "-8.00000000", "longitude": "178.00000000", "emoji": "🇹🇻" }, { "id": 229, "name": "Uganda", "iso3": "UGA", "iso2": "UG", "numeric_code": "800", "phone_code": 256, "capital": "Kampala", "currency": "UGX", "currency_name": "Ugandan shilling", "currency_symbol": "USh", "tld": ".ug", "native": "Uganda", "region": "Africa", "subregion": "Eastern Africa", "latitude": "1.00000000", "longitude": "32.00000000", "emoji": "🇺🇬" }, { "id": 230, "name": "Ukraine", "iso3": "UKR", "iso2": "UA", "numeric_code": "804", "phone_code": 380, "capital": "Kiev", "currency": "UAH", "currency_name": "Ukrainian hryvnia", "currency_symbol": "₴", "tld": ".ua", "native": "Україна", "region": "Europe", "subregion": "Eastern Europe", "latitude": "49.00000000", "longitude": "32.00000000", "emoji": "🇺🇦" }, { "id": 231, "name": "United Arab Emirates", "iso3": "ARE", "iso2": "AE", "numeric_code": "784", "phone_code": 971, "capital": "Abu Dhabi", "currency": "AED", "currency_name": "United Arab Emirates dirham", "currency_symbol": "إ.د", "tld": ".ae", "native": "دولة الإمارات العربية المتحدة", "region": "Asia", "subregion": "Western Asia", "latitude": "24.00000000", "longitude": "54.00000000", "emoji": "🇦🇪" }, { "id": 232, "name": "United Kingdom", "iso3": "GBR", "iso2": "GB", "numeric_code": "826", "phone_code": 44, "capital": "London", "currency": "GBP", "currency_name": "British pound", "currency_symbol": "£", "tld": ".uk", "native": "United Kingdom", "region": "Europe", "subregion": "Northern Europe", "latitude": "54.00000000", "longitude": "-2.00000000", "emoji": "🇬🇧" }, { "id": 233, "name": "United States", "iso3": "USA", "iso2": "US", "numeric_code": "840", "phone_code": 1, "capital": "Washington", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".us", "native": "United States", "region": "Americas", "subregion": "Northern America", "latitude": "38.00000000", "longitude": "-97.00000000", "emoji": "🇺🇸" }, { "id": 234, "name": "United States Minor Outlying Islands", "iso3": "UMI", "iso2": "UM", "numeric_code": "581", "phone_code": 1, "capital": "", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".us", "native": "United States Minor Outlying Islands", "region": "Americas", "subregion": "Northern America", "latitude": "0.00000000", "longitude": "0.00000000", "emoji": "🇺🇲" }, { "id": 235, "name": "Uruguay", "iso3": "URY", "iso2": "UY", "numeric_code": "858", "phone_code": 598, "capital": "Montevideo", "currency": "UYU", "currency_name": "Uruguayan peso", "currency_symbol": "$", "tld": ".uy", "native": "Uruguay", "region": "Americas", "subregion": "South America", "latitude": "-33.00000000", "longitude": "-56.00000000", "emoji": "🇺🇾" }, { "id": 236, "name": "Uzbekistan", "iso3": "UZB", "iso2": "UZ", "numeric_code": "860", "phone_code": 998, "capital": "Tashkent", "currency": "UZS", "currency_name": "Uzbekistani soʻm", "currency_symbol": "лв", "tld": ".uz", "native": "O‘zbekiston", "region": "Asia", "subregion": "Central Asia", "latitude": "41.00000000", "longitude": "64.00000000", "emoji": "🇺🇿" }, { "id": 237, "name": "Vanuatu", "iso3": "VUT", "iso2": "VU", "numeric_code": "548", "phone_code": 678, "capital": "Port Vila", "currency": "VUV", "currency_name": "Vanuatu vatu", "currency_symbol": "VT", "tld": ".vu", "native": "Vanuatu", "region": "Oceania", "subregion": "Melanesia", "latitude": "-16.00000000", "longitude": "167.00000000", "emoji": "🇻🇺" }, { "id": 238, "name": "Vatican City State (Holy See)", "iso3": "VAT", "iso2": "VA", "numeric_code": "336", "phone_code": 379, "capital": "Vatican City", "currency": "EUR", "currency_name": "Euro", "currency_symbol": "€", "tld": ".va", "native": "Vaticano", "region": "Europe", "subregion": "Southern Europe", "latitude": "41.90000000", "longitude": "12.45000000", "emoji": "🇻🇦" }, { "id": 239, "name": "Venezuela", "iso3": "VEN", "iso2": "VE", "numeric_code": "862", "phone_code": 58, "capital": "Caracas", "currency": "VEF", "currency_name": "Bolívar", "currency_symbol": "Bs", "tld": ".ve", "native": "Venezuela", "region": "Americas", "subregion": "South America", "latitude": "8.00000000", "longitude": "-66.00000000", "emoji": "🇻🇪" }, { "id": 240, "name": "Vietnam", "iso3": "VNM", "iso2": "VN", "numeric_code": "704", "phone_code": 84, "capital": "Hanoi", "currency": "VND", "currency_name": "Vietnamese đồng", "currency_symbol": "₫", "tld": ".vn", "native": "Việt Nam", "region": "Asia", "subregion": "South-Eastern Asia", "latitude": "16.16666666", "longitude": "107.83333333", "emoji": "🇻🇳" }, { "id": 241, "name": "Virgin Islands (British)", "iso3": "VGB", "iso2": "VG", "numeric_code": "092", "phone_code": 1, "capital": "Road Town", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".vg", "native": "British Virgin Islands", "region": "Americas", "subregion": "Caribbean", "latitude": "18.43138300", "longitude": "-64.62305000", "emoji": "🇻🇬" }, { "id": 242, "name": "Virgin Islands (US)", "iso3": "VIR", "iso2": "VI", "numeric_code": "850", "phone_code": 1, "capital": "Charlotte Amalie", "currency": "USD", "currency_name": "United States dollar", "currency_symbol": "$", "tld": ".vi", "native": "United States Virgin Islands", "region": "Americas", "subregion": "Caribbean", "latitude": "18.34000000", "longitude": "-64.93000000", "emoji": "🇻🇮" }, { "id": 243, "name": "Wallis And Futuna Islands", "iso3": "WLF", "iso2": "WF", "numeric_code": "876", "phone_code": 681, "capital": "Mata Utu", "currency": "XPF", "currency_name": "CFP franc", "currency_symbol": "₣", "tld": ".wf", "native": "Wallis et Futuna", "region": "Oceania", "subregion": "Polynesia", "latitude": "-13.30000000", "longitude": "-176.20000000", "emoji": "🇼🇫" }, { "id": 244, "name": "Western Sahara", "iso3": "ESH", "iso2": "EH", "numeric_code": "732", "phone_code": 212, "capital": "El-Aaiun", "currency": "MAD", "currency_name": "Moroccan Dirham", "currency_symbol": "MAD", "tld": ".eh", "native": "الصحراء الغربية", "region": "Africa", "subregion": "Northern Africa", "latitude": "24.50000000", "longitude": "-13.00000000", "emoji": "🇪🇭" }, { "id": 245, "name": "Yemen", "iso3": "YEM", "iso2": "YE", "numeric_code": "887", "phone_code": 967, "capital": "Sanaa", "currency": "YER", "currency_name": "Yemeni rial", "currency_symbol": "﷼", "tld": ".ye", "native": "اليَمَن", "region": "Asia", "subregion": "Western Asia", "latitude": "15.00000000", "longitude": "48.00000000", "emoji": "🇾🇪" }, { "id": 246, "name": "Zambia", "iso3": "ZMB", "iso2": "ZM", "numeric_code": "894", "phone_code": 260, "capital": "Lusaka", "currency": "ZMW", "currency_name": "Zambian kwacha", "currency_symbol": "ZK", "tld": ".zm", "native": "Zambia", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-15.00000000", "longitude": "30.00000000", "emoji": "🇿🇲" }, { "id": 247, "name": "Zimbabwe", "iso3": "ZWE", "iso2": "ZW", "numeric_code": "716", "phone_code": 263, "capital": "Harare", "currency": "ZWL", "currency_name": "Zimbabwe Dollar", "currency_symbol": "$", "tld": ".zw", "native": "Zimbabwe", "region": "Africa", "subregion": "Eastern Africa", "latitude": "-20.00000000", "longitude": "30.00000000", "emoji": "🇿🇼" }] +; \ No newline at end of file diff --git a/Binner/Binner.Web/ClientApp/src/pages/Settings.js b/Binner/Binner.Web/ClientApp/src/pages/Settings.js index 8a99e9d9..fafd274a 100644 --- a/Binner/Binner.Web/ClientApp/src/pages/Settings.js +++ b/Binner/Binner.Web/ClientApp/src/pages/Settings.js @@ -2,11 +2,12 @@ import React, { useState, useEffect } from "react"; import { useNavigate } from "react-router-dom"; import { useTranslation, Trans } from "react-i18next"; import _ from "underscore"; -import { Icon, Label, Button, Form, Segment, Header, Popup, Dropdown, Confirm, Breadcrumb } from "semantic-ui-react"; +import { Icon, Label, Button, Form, Segment, Header, Popup, Dropdown, Confirm, Breadcrumb, Flag } from "semantic-ui-react"; import ClearableInput from "../components/ClearableInput"; import LineTemplate from "../components/LineTemplate"; import { DEFAULT_FONT, BarcodeProfiles, GetAdvancedTypeDropdown, GetTypeDropdown } from "../common/Types"; import { DigiKeySites } from "../common/digiKeySites"; +import { TmeCountries } from "../common/tmeCountries"; import { FormHeader } from "../components/FormHeader"; import { fetchApi } from "../common/fetchApi"; import { getLocalData, setLocalData, removeLocalData } from "../common/storage"; @@ -87,91 +88,144 @@ export const Settings = (props) => { key: 1, value: "en", text: "English", - },{ + }, { key: 2, value: "br", text: "Breton", - },{ + }, { key: 3, value: "cs", text: "Czech", - },{ + }, { key: 4, value: "da", text: "Danish", - },{ + }, { key: 5, value: "de", text: "German", - },{ + }, { key: 6, value: "es", text: "Spanish", - },{ + }, { key: 7, value: "fi", text: "Finnish", - },{ + }, { key: 8, value: "fr", text: "French", - },{ + }, { key: 9, value: "he", text: "Hebrew", - },{ + }, { key: 10, value: "hu", text: "Hungarian", - },{ + }, { key: 11, value: "it", text: "Italian", - },{ + }, { key: 12, value: "ja", text: "Japanese", - },{ + }, { key: 13, value: "ko", text: "Korean", - },{ + }, { key: 14, value: "nl", text: "Dutch", - },{ + }, { key: 15, value: "no", text: "Norwegian", - },{ + }, { key: 16, value: "pl", text: "Polish", - },{ + }, { key: 17, value: "pt", text: "Portuguese", - },{ + }, { key: 18, value: "ro", text: "Romanian", - },{ + }, { key: 19, value: "sv", text: "Swedish", - },{ + }, { key: 20, value: "th", text: "Thai", - },{ + }, { key: 21, value: "zhs", text: "Chinese (Simplified)", - },{ + }, { key: 22, value: "zht", text: "Chinese (Traditional)", - },]); + }, + // languages below are compatible with TME, they don't use official language codes but rather country codes :P + { + key: 23, + value: "bg", + country: "BG", + text: "Bulgarian", + }, { + key: 24, + value: "rm", + country: "CH", + text: "Romansh", + }, { + key: 25, + value: "el", + country: "GR", + text: "Greek", + }, { + key: 26, + value: "hr", + country: "HR", + text: "Croatian", + }, { + key: 27, + value: "lt", + country: "LT", + text: "Lithuanian", + }, { + key: 28, + value: "lv", + country: "LV", + text: "Latvian", + }, { + key: 29, + value: "ru", + country: "RU", + text: "Russian", + }, { + key: 30, + value: "sk", + country: "SK", + text: "Slovak", + }, { + key: 31, + value: "tr", + country: "TR", + text: "Turkish", + }, { + key: 32, + value: "uk", + country: "UA", + text: "Ukraine", + }, + ]); const [currencies] = useState([{ key: 1, value: "USD", @@ -279,6 +333,13 @@ export const Settings = (props) => { },]); const barcodeProfileOptions = GetTypeDropdown(BarcodeProfiles); const digikeySites = GetAdvancedTypeDropdown(DigiKeySites); + const noFlags = ['ss', 'sk', 'sx', 'mf', 'bl', 'im', 'xk', 'je', 'gg', 'cw', 'bq', 'aq']; + const tmeCountries = TmeCountries.map((i, key) => ({ + key, + value: i.iso2, + text: i.name, + flag: !noFlags.includes(i.iso2.toLowerCase()) ? i.iso2.toLowerCase() : "" + })); const [settings, setSettings] = useState({ licenseKey: "", language: "", @@ -319,6 +380,13 @@ export const Settings = (props) => { clientId: "", clientSecret: "", }, + tme: { + enabled: false, + applicationSecret: "", + apiKey: "", + apiUrl: "", + country: "us" + }, printer: { printMode: 0, printerName: "", @@ -546,6 +614,9 @@ export const Settings = (props) => { else if (control.name.startsWith("octopart")) { setControlValue(newSettings.octopart, "octopart", control); } + else if (control.name.startsWith("tme")) { + setControlValue(newSettings.tme, "tme", control); + } else if (control.name.startsWith("barcode")) { setControlValue(newSettings.barcode, "barcode", control); } else if (control.name.startsWith("printer")) { @@ -695,6 +766,13 @@ export const Settings = (props) => { configuration.push({ key: "clientId", value: settings.octopart.clientId }); configuration.push({ key: "clientSecret", value: settings.octopart.clientSecret }); break; + case "tme": + configuration.push({ key: "enabled", value: settings.tme.enabled + "" }); + configuration.push({ key: "applicationSecret", value: settings.tme.applicationSecret }); + configuration.push({ key: "country", value: settings.tme.country }); + configuration.push({ key: "apiKey", value: settings.tme.apiKey }); + configuration.push({ key: "apiUrl", value: settings.tme.apiUrl }); + break; default: break; } @@ -1604,6 +1682,134 @@ export const Settings = (props) => { {getTestResultIcon("octopart")} + + +
+ {t('page.settings.tmeelectronics', "TME Electronics")} +
+

+ + TME API Keys can be obtained at https://developers.tme.eu + +

+ + + {t('page.settings.popup.tmeEnabled', "Choose if you would like to enable TME support.")}

+ } + trigger={ + + } + /> +
+ + + {t('page.settings.popup.country', "Choose the country to pass the API.")}

+ } + trigger={ + + } + /> +
+ + + {t('page.settings.popup.tmeApplicationSecret', "Your application secret for TME.")}

} + trigger={ + + } + /> +
+ + + {t('page.settings.popup.tmeApiKey', "Your api key for TME.")}

} + trigger={ + + } + /> +
+ + + {t('page.settings.popup.tmeApiUrl', "TME's API Url. This will be api.tme.eu")}

} + trigger={ + + + + + } + /> +
+ + + {getTestResultIcon("tme")} + +
diff --git a/Binner/Binner.Web/Controllers/SystemController.cs b/Binner/Binner.Web/Controllers/SystemController.cs index a55312f4..27a8d74c 100644 --- a/Binner/Binner.Web/Controllers/SystemController.cs +++ b/Binner/Binner.Web/Controllers/SystemController.cs @@ -78,6 +78,7 @@ public IActionResult SaveSettings(SettingsRequest request) request.Digikey.oAuthPostbackUrl = $"https://{request.Digikey.oAuthPostbackUrl.Replace("https://", "").Replace("http://", "")}"; request.Mouser.ApiUrl = $"https://{request.Mouser.ApiUrl.Replace("https://", "").Replace("http://", "")}"; request.Arrow.ApiUrl = $"https://{request.Arrow.ApiUrl.Replace("https://", "").Replace("http://", "")}"; + request.Tme.ApiUrl = $"https://{request.Tme.ApiUrl.Replace("https://", "").Replace("http://", "")}"; // clear the credentials cache for the apis var user = _requestContext.GetUserContext(); diff --git a/Binner/Binner.Web/appsettings.Production.json b/Binner/Binner.Web/appsettings.Production.json index 8e5c573f..42d5e2a2 100644 --- a/Binner/Binner.Web/appsettings.Production.json +++ b/Binner/Binner.Web/appsettings.Production.json @@ -13,8 +13,12 @@ "CacheAbsoluteExpirationMinutes": 0, // set the maximum length of time the part types can be cached before forcing a refresh "MaxPartTypesCacheLifetime": "00:30:00", + "Licensing": { + // if you have a paid Binner Cloud subscription, provide your license key to activate pro features + "LicenseKey": "" + }, "Locale": { - // valid languages: en, br, cs, da, de, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht + // valid languages: en, br, cs, da, de, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht, bg, rm, el, hr, lt, lv, ru, sk, tr, uk "Language": "en", // valid currencies: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP "Currency": "USD" @@ -79,6 +83,14 @@ "Username": "", "ApiUrl": "https://api.arrow.com" }, + "Tme": { + "Enabled": false, + "Country": "us", + // TME API Keys can be obtained at https://developers.tme.eu/login + "ApiKey": "", + "ApplicationSecret": "", + "ApiUrl": "https://api.tme.eu/" + }, // AliExpress API is not currently supported "AliExpress": { "Enabled": false, diff --git a/Binner/Binner.Web/appsettings.json b/Binner/Binner.Web/appsettings.json index eed25ad6..ea1794f2 100644 --- a/Binner/Binner.Web/appsettings.json +++ b/Binner/Binner.Web/appsettings.json @@ -18,7 +18,7 @@ "LicenseKey": "" }, "Locale": { - // valid languages: en, br, cs, da, de, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht + // valid languages: en, br, cs, da, de, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht, bg, rm, el, hr, lt, lv, ru, sk, tr, uk "Language": "en", // valid currencies: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP "Currency": "USD" @@ -84,6 +84,14 @@ "Username": "", "ApiUrl": "https://api.arrow.com" }, + "Tme": { + "Enabled": true, + "Country": "us", + // TME API Keys can be obtained at https://developers.tme.eu/login + "ApiKey": "edfac4f62d8fe6dace47144e0671b22a7f2a5eea93edb", + "ApplicationSecret": "ebd60f4bc378fd34c5c2", + "ApiUrl": "https://api.tme.eu/" + }, // AliExpress API is not currently supported "AliExpress": { "Enabled": false, diff --git a/Binner/Data/Binner.Data.Migrations.MySql/Migrations/20240407012334_AddTmeCountry.Designer.cs b/Binner/Data/Binner.Data.Migrations.MySql/Migrations/20240407012334_AddTmeCountry.Designer.cs new file mode 100644 index 00000000..c9a17a39 --- /dev/null +++ b/Binner/Data/Binner.Data.Migrations.MySql/Migrations/20240407012334_AddTmeCountry.Designer.cs @@ -0,0 +1,1725 @@ +// +using System; +using Binner.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Binner.Data.Migrations.MySql.Migrations +{ + [DbContext(typeof(BinnerContext))] + [Migration("20240407012334_AddTmeCountry")] + partial class AddTmeCountry + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("dbo") + .HasAnnotation("ProductVersion", "7.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Binner.Data.Model.Label", b => + { + b.Property("LabelId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("IsPartLabelTemplate") + .HasColumnType("tinyint(1)"); + + b.Property("LabelTemplateId") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("Template") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("LabelId"); + + b.HasIndex("LabelTemplateId"); + + b.ToTable("Labels", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.LabelTemplate", b => + { + b.Property("LabelTemplateId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Dpi") + .HasColumnType("int"); + + b.Property("DriverHeight") + .HasColumnType("int"); + + b.Property("DriverName") + .HasColumnType("longtext"); + + b.Property("DriverWidth") + .HasColumnType("int"); + + b.Property("ExtraData") + .HasColumnType("longtext"); + + b.Property("Height") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("LabelCount") + .HasColumnType("int"); + + b.Property("LabelPaperSource") + .HasColumnType("int"); + + b.Property("Margin") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.Property("Width") + .IsRequired() + .HasColumnType("longtext"); + + b.HasKey("LabelTemplateId"); + + b.ToTable("LabelTemplates", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthCredential", b => + { + b.Property("Provider") + .HasMaxLength(128) + .HasColumnType("varchar(128)"); + + b.Property("AccessToken") + .HasColumnType("longtext"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateExpiresUtc") + .HasColumnType("datetime(6)"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("RefreshToken") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Provider"); + + b.HasIndex("UserId"); + + b.ToTable("OAuthCredentials", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthRequest", b => + { + b.Property("OAuthRequestId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AuthorizationCode") + .HasColumnType("longtext"); + + b.Property("AuthorizationReceived") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(false); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Error") + .HasColumnType("longtext"); + + b.Property("ErrorDescription") + .HasColumnType("longtext"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("Provider") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("RequestId") + .HasColumnType("char(36)"); + + b.Property("ReturnToUrl") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("OAuthRequestId"); + + b.HasIndex("UserId"); + + b.ToTable("OAuthRequests", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Organization", b => + { + b.Property("OrganizationId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("DateCreatedUtc") + .HasColumnType("datetime(6)"); + + b.Property("DateModifiedUtc") + .HasColumnType("datetime(6)"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.HasKey("OrganizationId"); + + b.ToTable("Organizations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.Property("PartId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("ArrowPartNumber") + .HasColumnType("longtext"); + + b.Property("BinNumber") + .HasColumnType("varchar(255)"); + + b.Property("BinNumber2") + .HasColumnType("varchar(255)"); + + b.Property("Cost") + .HasColumnType("decimal(18,4)"); + + b.Property("Currency") + .HasColumnType("longtext"); + + b.Property("DatasheetUrl") + .HasColumnType("longtext"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("varchar(255)"); + + b.Property("DigiKeyPartNumber") + .HasColumnType("varchar(255)"); + + b.Property("ExtensionValue1") + .HasColumnType("longtext"); + + b.Property("ExtensionValue2") + .HasColumnType("longtext"); + + b.Property("FootprintName") + .HasColumnType("longtext"); + + b.Property("ImageUrl") + .HasColumnType("longtext"); + + b.Property("Keywords") + .HasColumnType("varchar(255)"); + + b.Property("Location") + .HasColumnType("varchar(255)"); + + b.Property("LowStockThreshold") + .HasColumnType("int"); + + b.Property("LowestCostSupplier") + .HasColumnType("longtext"); + + b.Property("LowestCostSupplierUrl") + .HasColumnType("longtext"); + + b.Property("Manufacturer") + .HasColumnType("varchar(255)"); + + b.Property("ManufacturerPartNumber") + .HasColumnType("varchar(255)"); + + b.Property("MountingTypeId") + .HasColumnType("int"); + + b.Property("MouserPartNumber") + .HasColumnType("varchar(255)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PackageType") + .HasColumnType("longtext"); + + b.Property("PartNumber") + .HasMaxLength(64) + .HasColumnType("varchar(64)"); + + b.Property("PartTypeId") + .HasColumnType("bigint"); + + b.Property("ProductUrl") + .HasColumnType("longtext"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("bigint"); + + b.Property("SymbolName") + .HasColumnType("longtext"); + + b.Property("TmePartNumber") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("PartId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.HasIndex("BinNumber", "UserId"); + + b.HasIndex("BinNumber2", "UserId"); + + b.HasIndex("Description", "UserId"); + + b.HasIndex("DigiKeyPartNumber", "UserId"); + + b.HasIndex("Keywords", "UserId"); + + b.HasIndex("Location", "UserId"); + + b.HasIndex("Manufacturer", "UserId"); + + b.HasIndex("ManufacturerPartNumber", "UserId"); + + b.HasIndex("MouserPartNumber", "UserId"); + + b.HasIndex("PartNumber", "UserId"); + + b.HasIndex("PartTypeId", "UserId"); + + b.ToTable("Parts", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartSupplier", b => + { + b.Property("PartSupplierId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Cost") + .HasColumnType("decimal(18,4)"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("ImageUrl") + .HasColumnType("longtext"); + + b.Property("MinimumOrderQuantity") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PartId") + .HasColumnType("bigint"); + + b.Property("ProductUrl") + .HasColumnType("longtext"); + + b.Property("QuantityAvailable") + .HasColumnType("int"); + + b.Property("SupplierPartNumber") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("PartSupplierId"); + + b.HasIndex("PartId"); + + b.HasIndex("UserId"); + + b.ToTable("PartSuppliers", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.Property("PartTypeId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Icon") + .HasColumnType("longtext"); + + b.Property("Name") + .HasColumnType("varchar(255)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("ParentPartTypeId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("PartTypeId"); + + b.HasIndex("ParentPartTypeId"); + + b.HasIndex("UserId"); + + b.HasIndex("Name", "UserId"); + + b.ToTable("PartTypes", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.Property("PcbId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("LastSerialNumber") + .HasColumnType("longtext"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("SerialNumberFormat") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("PcbId"); + + b.HasIndex("UserId"); + + b.ToTable("Pcbs", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PcbStoredFileAssignment", b => + { + b.Property("PcbStoredFileAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Name") + .HasColumnType("longtext"); + + b.Property("Notes") + .HasColumnType("longtext"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("StoredFileId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("PcbStoredFileAssignmentId"); + + b.HasIndex("PcbId"); + + b.HasIndex("StoredFileId"); + + b.HasIndex("UserId"); + + b.ToTable("PcbStoredFileAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.Property("ProjectId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Color") + .HasColumnType("int"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("Location") + .HasColumnType("longtext"); + + b.Property("Name") + .HasColumnType("varchar(255)"); + + b.Property("Notes") + .HasColumnType("longtext"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("ProjectId"); + + b.HasIndex("UserId"); + + b.HasIndex("Name", "UserId"); + + b.ToTable("Projects", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPartAssignment", b => + { + b.Property("ProjectPartAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Cost") + .HasColumnType("double"); + + b.Property("Currency") + .HasColumnType("longtext"); + + b.Property("CustomDescription") + .HasColumnType("longtext"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Notes") + .HasColumnType("longtext"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PartId") + .HasColumnType("bigint"); + + b.Property("PartName") + .HasColumnType("longtext"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("QuantityAvailable") + .HasColumnType("int"); + + b.Property("ReferenceId") + .HasColumnType("longtext"); + + b.Property("SchematicReferenceId") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("ProjectPartAssignmentId"); + + b.HasIndex("PartId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPartAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbAssignment", b => + { + b.Property("ProjectPcbAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("ProjectPcbAssignmentId"); + + b.HasIndex("PcbId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPcbAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbProduceHistory", b => + { + b.Property("ProjectPcbProduceHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PartsConsumed") + .HasColumnType("int"); + + b.Property("PcbCost") + .HasColumnType("double"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("PcbQuantity") + .HasColumnType("int"); + + b.Property("ProjectProduceHistoryId") + .HasColumnType("bigint"); + + b.Property("SerialNumber") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("ProjectPcbProduceHistoryId"); + + b.HasIndex("PcbId"); + + b.HasIndex("ProjectProduceHistoryId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPcbProduceHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.Property("ProjectProduceHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PartsConsumed") + .HasColumnType("int"); + + b.Property("ProduceUnassociated") + .HasColumnType("tinyint(1)"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("ProjectProduceHistoryId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectProduceHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.Property("StoredFileId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Crc32") + .HasColumnType("int"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("FileLength") + .HasColumnType("int"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("OriginalFileName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("PartId") + .HasColumnType("bigint"); + + b.Property("RecordId") + .HasColumnType("bigint"); + + b.Property("RecordType") + .HasColumnType("int"); + + b.Property("StoredFileType") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("StoredFileId"); + + b.HasIndex("PartId"); + + b.HasIndex("UserId"); + + b.ToTable("StoredFiles", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.User", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateEmailConfirmedUtc") + .HasColumnType("datetime(6)"); + + b.Property("DateLastActiveUtc") + .HasColumnType("datetime(6)"); + + b.Property("DateLastLoginUtc") + .HasColumnType("datetime(6)"); + + b.Property("DateLockedUtc") + .HasColumnType("datetime(6)"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("EmailAddress") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("EmailConfirmationToken") + .HasColumnType("longtext"); + + b.Property("EmailConfirmedIp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("IsAdmin") + .HasColumnType("tinyint(1)"); + + b.Property("IsEmailConfirmed") + .HasColumnType("tinyint(1)"); + + b.Property("IsEmailSubscribed") + .HasColumnType("tinyint(1)"); + + b.Property("LastSetPasswordIp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("LocaleCurrency") + .HasColumnType("longtext"); + + b.Property("LocaleLanguage") + .HasColumnType("longtext"); + + b.Property("Name") + .IsRequired() + .HasColumnType("varchar(255)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("PhoneNumber") + .HasColumnType("varchar(255)"); + + b.Property("ProfileImage") + .HasColumnType("longblob"); + + b.Property("ReCaptchaScore") + .HasColumnType("double"); + + b.HasKey("UserId"); + + b.HasIndex("EmailAddress"); + + b.HasIndex("Name"); + + b.HasIndex("PhoneNumber"); + + b.ToTable("Users", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserIntegrationConfiguration", b => + { + b.Property("UserIntegrationConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ArrowApiKey") + .HasColumnType("longtext"); + + b.Property("ArrowApiUrl") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("ArrowEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("ArrowUsername") + .HasColumnType("longtext"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DigiKeyApiUrl") + .HasColumnType("longtext"); + + b.Property("DigiKeyClientId") + .HasColumnType("longtext"); + + b.Property("DigiKeyClientSecret") + .HasColumnType("longtext"); + + b.Property("DigiKeyEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("DigiKeyOAuthPostbackUrl") + .HasColumnType("longtext"); + + b.Property("MouserApiUrl") + .HasColumnType("longtext"); + + b.Property("MouserCartApiKey") + .HasColumnType("longtext"); + + b.Property("MouserEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("MouserOrderApiKey") + .HasColumnType("longtext"); + + b.Property("MouserSearchApiKey") + .HasColumnType("longtext"); + + b.Property("OctopartClientId") + .HasColumnType("longtext"); + + b.Property("OctopartClientSecret") + .HasColumnType("longtext"); + + b.Property("OctopartEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("SwarmApiKey") + .HasColumnType("longtext"); + + b.Property("SwarmApiUrl") + .HasColumnType("longtext"); + + b.Property("SwarmEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("SwarmTimeout") + .HasColumnType("time(6)"); + + b.Property("TmeApiKey") + .HasColumnType("longtext"); + + b.Property("TmeApiUrl") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("TmeApplicationSecret") + .HasColumnType("longtext"); + + b.Property("TmeCountry") + .HasColumnType("longtext"); + + b.Property("TmeEnabled") + .HasColumnType("tinyint(1)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("UserIntegrationConfigurationId"); + + b.HasIndex("UserId"); + + b.ToTable("UserIntegrationConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserLoginHistory", b => + { + b.Property("UserLoginHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CanLogin") + .HasColumnType("tinyint(1)"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("EmailAddress") + .HasColumnType("longtext"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("IsSuccessful") + .HasColumnType("tinyint(1)"); + + b.Property("Message") + .HasColumnType("longtext"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("ReCaptchaScore") + .HasColumnType("double"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("UserLoginHistoryId"); + + b.HasIndex("UserId"); + + b.ToTable("UserLoginHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.Property("UserPrinterConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PartLabelName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("PartLabelSource") + .HasColumnType("int"); + + b.Property("PrinterName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("RemoteAddressUrl") + .HasColumnType("longtext"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("UserPrinterConfigurationId"); + + b.HasIndex("UserId"); + + b.ToTable("UserPrinterConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterTemplateConfiguration", b => + { + b.Property("UserPrinterTemplateConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AutoSize") + .HasColumnType("tinyint(1)"); + + b.Property("Barcode") + .HasColumnType("tinyint(1)"); + + b.Property("Color") + .HasColumnType("longtext"); + + b.Property("Content") + .HasColumnType("longtext"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("FontName") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("FontSize") + .HasColumnType("int"); + + b.Property("Label") + .HasColumnType("int"); + + b.Property("Line") + .HasColumnType("int"); + + b.Property("LowerCase") + .HasColumnType("tinyint(1)"); + + b.Property("MarginBottom") + .HasColumnType("int"); + + b.Property("MarginLeft") + .HasColumnType("int"); + + b.Property("MarginRight") + .HasColumnType("int"); + + b.Property("MarginTop") + .HasColumnType("int"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("Position") + .HasColumnType("int"); + + b.Property("Rotate") + .HasColumnType("int"); + + b.Property("UpperCase") + .HasColumnType("tinyint(1)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.Property("UserPrinterConfigurationId") + .HasColumnType("int"); + + b.HasKey("UserPrinterTemplateConfigurationId"); + + b.HasIndex("UserId"); + + b.HasIndex("UserPrinterConfigurationId"); + + b.ToTable("UserPrinterTemplateConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserToken", b => + { + b.Property("UserTokenId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateExpiredUtc") + .HasColumnType("datetime(6)"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateRevokedUtc") + .HasColumnType("datetime(6)"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("ReplacedByToken") + .HasColumnType("longtext"); + + b.Property("Token") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("TokenTypeId") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("UserTokenId"); + + b.HasIndex("UserId"); + + b.ToTable("UserTokens", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Label", b => + { + b.HasOne("Binner.Data.Model.LabelTemplate", "LabelTemplate") + .WithMany("Labels") + .HasForeignKey("LabelTemplateId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("LabelTemplate"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthCredential", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("OAuthCredentials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthRequest", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("OAuthRequests") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.HasOne("Binner.Data.Model.PartType", "PartType") + .WithMany("Parts") + .HasForeignKey("PartTypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("Parts") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Parts") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("PartType"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartSupplier", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("PartSuppliers") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PartSuppliers") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.HasOne("Binner.Data.Model.PartType", "ParentPartType") + .WithMany() + .HasForeignKey("ParentPartTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PartTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("ParentPartType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Pcbs") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PcbStoredFileAssignment", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("PcbId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.StoredFile", "StoredFile") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("StoredFileId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("StoredFile"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Projects") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPartAssignment", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("ProjectPartAssignments") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectPartAssignments") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPartAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbAssignment", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("PcbId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbProduceHistory", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("PcbId"); + + b.HasOne("Binner.Data.Model.ProjectProduceHistory", "ProjectProduceHistory") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("ProjectProduceHistoryId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("ProjectProduceHistory"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectProduceHistory") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectProduceHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("StoredFiles") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("StoredFiles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserIntegrationConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserIntegrationConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserLoginHistory", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserLoginHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserPrinterConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterTemplateConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserPrinterTemplateConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Binner.Data.Model.UserPrinterConfiguration", "UserPrinterConfiguration") + .WithMany("UserPrinterTemplateConfigurations") + .HasForeignKey("UserPrinterConfigurationId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("User"); + + b.Navigation("UserPrinterConfiguration"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserToken", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserTokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.LabelTemplate", b => + { + b.Navigation("Labels"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.Navigation("PartSuppliers"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("StoredFiles"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.Navigation("Parts"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.Navigation("PcbStoredFileAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectPcbProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.Navigation("Parts"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.Navigation("ProjectPcbProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.Navigation("PcbStoredFileAssignments"); + }); + + modelBuilder.Entity("Binner.Data.Model.User", b => + { + b.Navigation("OAuthCredentials"); + + b.Navigation("OAuthRequests"); + + b.Navigation("PartSuppliers"); + + b.Navigation("PartTypes"); + + b.Navigation("Parts"); + + b.Navigation("PcbStoredFileAssignments"); + + b.Navigation("Pcbs"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectPcbProduceHistory"); + + b.Navigation("ProjectProduceHistory"); + + b.Navigation("Projects"); + + b.Navigation("StoredFiles"); + + b.Navigation("UserIntegrationConfigurations"); + + b.Navigation("UserLoginHistory"); + + b.Navigation("UserPrinterConfigurations"); + + b.Navigation("UserPrinterTemplateConfigurations"); + + b.Navigation("UserTokens"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.Navigation("UserPrinterTemplateConfigurations"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Binner/Data/Binner.Data.Migrations.MySql/Migrations/20240407012334_AddTmeCountry.cs b/Binner/Data/Binner.Data.Migrations.MySql/Migrations/20240407012334_AddTmeCountry.cs new file mode 100644 index 00000000..f07d4ffc --- /dev/null +++ b/Binner/Data/Binner.Data.Migrations.MySql/Migrations/20240407012334_AddTmeCountry.cs @@ -0,0 +1,83 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Binner.Data.Migrations.MySql.Migrations +{ + /// + public partial class AddTmeCountry : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "TmeApiKey", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "TmeApiUrl", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "longtext", + nullable: false) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "TmeApplicationSecret", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "TmeCountry", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "longtext", + nullable: true) + .Annotation("MySql:CharSet", "utf8mb4"); + + migrationBuilder.AddColumn( + name: "TmeEnabled", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "tinyint(1)", + nullable: false, + defaultValue: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "TmeApiKey", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeApiUrl", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeApplicationSecret", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeCountry", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeEnabled", + schema: "dbo", + table: "UserIntegrationConfigurations"); + } + } +} diff --git a/Binner/Data/Binner.Data.Migrations.MySql/Migrations/BinnerContextModelSnapshot.cs b/Binner/Data/Binner.Data.Migrations.MySql/Migrations/BinnerContextModelSnapshot.cs index 810c1b63..153dfb01 100644 --- a/Binner/Data/Binner.Data.Migrations.MySql/Migrations/BinnerContextModelSnapshot.cs +++ b/Binner/Data/Binner.Data.Migrations.MySql/Migrations/BinnerContextModelSnapshot.cs @@ -1068,6 +1068,22 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("SwarmTimeout") .HasColumnType("time(6)"); + b.Property("TmeApiKey") + .HasColumnType("longtext"); + + b.Property("TmeApiUrl") + .IsRequired() + .HasColumnType("longtext"); + + b.Property("TmeApplicationSecret") + .HasColumnType("longtext"); + + b.Property("TmeCountry") + .HasColumnType("longtext"); + + b.Property("TmeEnabled") + .HasColumnType("tinyint(1)"); + b.Property("UserId") .HasColumnType("int"); diff --git a/Binner/Data/Binner.Data.Migrations.Postgresql/Migrations/20240407012318_AddTmeCountry.Designer.cs b/Binner/Data/Binner.Data.Migrations.Postgresql/Migrations/20240407012318_AddTmeCountry.Designer.cs new file mode 100644 index 00000000..84a05415 --- /dev/null +++ b/Binner/Data/Binner.Data.Migrations.Postgresql/Migrations/20240407012318_AddTmeCountry.Designer.cs @@ -0,0 +1,1770 @@ +// +using System; +using Binner.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; + +#nullable disable + +namespace Binner.Data.Migrations.Postgresql.Migrations +{ + [DbContext(typeof(BinnerContext))] + [Migration("20240407012318_AddTmeCountry")] + partial class AddTmeCountry + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("dbo") + .HasAnnotation("ProductVersion", "7.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("Binner.Data.Model.Label", b => + { + b.Property("LabelId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("LabelId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("IsPartLabelTemplate") + .HasColumnType("boolean"); + + b.Property("LabelTemplateId") + .HasColumnType("integer"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("Template") + .IsRequired() + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("LabelId"); + + b.HasIndex("LabelTemplateId"); + + b.ToTable("Labels", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.LabelTemplate", b => + { + b.Property("LabelTemplateId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("LabelTemplateId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Dpi") + .HasColumnType("integer"); + + b.Property("DriverHeight") + .HasColumnType("integer"); + + b.Property("DriverName") + .HasColumnType("text"); + + b.Property("DriverWidth") + .HasColumnType("integer"); + + b.Property("ExtraData") + .HasColumnType("text"); + + b.Property("Height") + .IsRequired() + .HasColumnType("text"); + + b.Property("LabelCount") + .HasColumnType("integer"); + + b.Property("LabelPaperSource") + .HasColumnType("integer"); + + b.Property("Margin") + .IsRequired() + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.Property("Width") + .IsRequired() + .HasColumnType("text"); + + b.HasKey("LabelTemplateId"); + + b.ToTable("LabelTemplates", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthCredential", b => + { + b.Property("Provider") + .HasMaxLength(128) + .HasColumnType("character varying(128)"); + + b.Property("AccessToken") + .HasColumnType("text"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateExpiresUtc") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("RefreshToken") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("Provider"); + + b.HasIndex("UserId"); + + b.ToTable("OAuthCredentials", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthRequest", b => + { + b.Property("OAuthRequestId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("OAuthRequestId")); + + b.Property("AuthorizationCode") + .HasColumnType("text"); + + b.Property("AuthorizationReceived") + .ValueGeneratedOnAdd() + .HasColumnType("boolean") + .HasDefaultValue(false); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Error") + .HasColumnType("text"); + + b.Property("ErrorDescription") + .HasColumnType("text"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("Provider") + .IsRequired() + .HasColumnType("text"); + + b.Property("RequestId") + .HasColumnType("uuid"); + + b.Property("ReturnToUrl") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("OAuthRequestId"); + + b.HasIndex("UserId"); + + b.ToTable("OAuthRequests", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Organization", b => + { + b.Property("OrganizationId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("OrganizationId")); + + b.Property("DateCreatedUtc") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModifiedUtc") + .HasColumnType("timestamp with time zone"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.HasKey("OrganizationId"); + + b.ToTable("Organizations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.Property("PartId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("PartId")); + + b.Property("ArrowPartNumber") + .HasColumnType("text"); + + b.Property("BinNumber") + .HasColumnType("text"); + + b.Property("BinNumber2") + .HasColumnType("text"); + + b.Property("Cost") + .HasColumnType("decimal(18,4)"); + + b.Property("Currency") + .HasColumnType("text"); + + b.Property("DatasheetUrl") + .HasColumnType("text"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("DigiKeyPartNumber") + .HasColumnType("text"); + + b.Property("ExtensionValue1") + .HasColumnType("text"); + + b.Property("ExtensionValue2") + .HasColumnType("text"); + + b.Property("FootprintName") + .HasColumnType("text"); + + b.Property("ImageUrl") + .HasColumnType("text"); + + b.Property("Keywords") + .HasColumnType("text"); + + b.Property("Location") + .HasColumnType("text"); + + b.Property("LowStockThreshold") + .HasColumnType("integer"); + + b.Property("LowestCostSupplier") + .HasColumnType("text"); + + b.Property("LowestCostSupplierUrl") + .HasColumnType("text"); + + b.Property("Manufacturer") + .HasColumnType("text"); + + b.Property("ManufacturerPartNumber") + .HasColumnType("text"); + + b.Property("MountingTypeId") + .HasColumnType("integer"); + + b.Property("MouserPartNumber") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("PackageType") + .HasColumnType("text"); + + b.Property("PartNumber") + .HasMaxLength(64) + .HasColumnType("character varying(64)"); + + b.Property("PartTypeId") + .HasColumnType("bigint"); + + b.Property("ProductUrl") + .HasColumnType("text"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("bigint"); + + b.Property("SymbolName") + .HasColumnType("text"); + + b.Property("TmePartNumber") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("PartId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.HasIndex("BinNumber", "UserId"); + + b.HasIndex("BinNumber2", "UserId"); + + b.HasIndex("Description", "UserId"); + + b.HasIndex("DigiKeyPartNumber", "UserId"); + + b.HasIndex("Keywords", "UserId"); + + b.HasIndex("Location", "UserId"); + + b.HasIndex("Manufacturer", "UserId"); + + b.HasIndex("ManufacturerPartNumber", "UserId"); + + b.HasIndex("MouserPartNumber", "UserId"); + + b.HasIndex("PartNumber", "UserId"); + + b.HasIndex("PartTypeId", "UserId"); + + b.ToTable("Parts", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartSupplier", b => + { + b.Property("PartSupplierId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("PartSupplierId")); + + b.Property("Cost") + .HasColumnType("decimal(18,4)"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("ImageUrl") + .HasColumnType("text"); + + b.Property("MinimumOrderQuantity") + .HasColumnType("integer"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("PartId") + .HasColumnType("bigint"); + + b.Property("ProductUrl") + .HasColumnType("text"); + + b.Property("QuantityAvailable") + .HasColumnType("integer"); + + b.Property("SupplierPartNumber") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("PartSupplierId"); + + b.HasIndex("PartId"); + + b.HasIndex("UserId"); + + b.ToTable("PartSuppliers", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.Property("PartTypeId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("PartTypeId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Icon") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("ParentPartTypeId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("PartTypeId"); + + b.HasIndex("ParentPartTypeId"); + + b.HasIndex("UserId"); + + b.HasIndex("Name", "UserId"); + + b.ToTable("PartTypes", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.Property("PcbId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("PcbId")); + + b.Property("Cost") + .HasColumnType("double precision"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("LastSerialNumber") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("Quantity") + .HasColumnType("integer"); + + b.Property("SerialNumberFormat") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("PcbId"); + + b.HasIndex("UserId"); + + b.ToTable("Pcbs", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PcbStoredFileAssignment", b => + { + b.Property("PcbStoredFileAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("PcbStoredFileAssignmentId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Notes") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("StoredFileId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("PcbStoredFileAssignmentId"); + + b.HasIndex("PcbId"); + + b.HasIndex("StoredFileId"); + + b.HasIndex("UserId"); + + b.ToTable("PcbStoredFileAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.Property("ProjectId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ProjectId")); + + b.Property("Color") + .HasColumnType("integer"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("text"); + + b.Property("Location") + .HasColumnType("text"); + + b.Property("Name") + .HasColumnType("text"); + + b.Property("Notes") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("ProjectId"); + + b.HasIndex("UserId"); + + b.HasIndex("Name", "UserId"); + + b.ToTable("Projects", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPartAssignment", b => + { + b.Property("ProjectPartAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ProjectPartAssignmentId")); + + b.Property("Cost") + .HasColumnType("double precision"); + + b.Property("Currency") + .HasColumnType("text"); + + b.Property("CustomDescription") + .HasColumnType("text"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Notes") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("PartId") + .HasColumnType("bigint"); + + b.Property("PartName") + .HasColumnType("text"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("integer"); + + b.Property("QuantityAvailable") + .HasColumnType("integer"); + + b.Property("ReferenceId") + .HasColumnType("text"); + + b.Property("SchematicReferenceId") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("ProjectPartAssignmentId"); + + b.HasIndex("PartId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPartAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbAssignment", b => + { + b.Property("ProjectPcbAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ProjectPcbAssignmentId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("ProjectPcbAssignmentId"); + + b.HasIndex("PcbId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPcbAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbProduceHistory", b => + { + b.Property("ProjectPcbProduceHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ProjectPcbProduceHistoryId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("PartsConsumed") + .HasColumnType("integer"); + + b.Property("PcbCost") + .HasColumnType("double precision"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("PcbQuantity") + .HasColumnType("integer"); + + b.Property("ProjectProduceHistoryId") + .HasColumnType("bigint"); + + b.Property("SerialNumber") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("ProjectPcbProduceHistoryId"); + + b.HasIndex("PcbId"); + + b.HasIndex("ProjectProduceHistoryId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPcbProduceHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.Property("ProjectProduceHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ProjectProduceHistoryId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("PartsConsumed") + .HasColumnType("integer"); + + b.Property("ProduceUnassociated") + .HasColumnType("boolean"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("integer"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("ProjectProduceHistoryId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectProduceHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.Property("StoredFileId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("StoredFileId")); + + b.Property("Crc32") + .HasColumnType("integer"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("FileLength") + .HasColumnType("integer"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("OriginalFileName") + .IsRequired() + .HasColumnType("text"); + + b.Property("PartId") + .HasColumnType("bigint"); + + b.Property("RecordId") + .HasColumnType("bigint"); + + b.Property("RecordType") + .HasColumnType("integer"); + + b.Property("StoredFileType") + .HasColumnType("integer"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("StoredFileId"); + + b.HasIndex("PartId"); + + b.HasIndex("UserId"); + + b.ToTable("StoredFiles", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.User", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("UserId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateEmailConfirmedUtc") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastActiveUtc") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLastLoginUtc") + .HasColumnType("timestamp with time zone"); + + b.Property("DateLockedUtc") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("EmailAddress") + .IsRequired() + .HasColumnType("text"); + + b.Property("EmailConfirmationToken") + .HasColumnType("text"); + + b.Property("EmailConfirmedIp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("IsAdmin") + .HasColumnType("boolean"); + + b.Property("IsEmailConfirmed") + .HasColumnType("boolean"); + + b.Property("IsEmailSubscribed") + .HasColumnType("boolean"); + + b.Property("LastSetPasswordIp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("LocaleCurrency") + .HasColumnType("text"); + + b.Property("LocaleLanguage") + .HasColumnType("text"); + + b.Property("Name") + .IsRequired() + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("text"); + + b.Property("PhoneNumber") + .HasColumnType("text"); + + b.Property("ProfileImage") + .HasColumnType("bytea"); + + b.Property("ReCaptchaScore") + .HasColumnType("double precision"); + + b.HasKey("UserId"); + + b.HasIndex("EmailAddress"); + + b.HasIndex("Name"); + + b.HasIndex("PhoneNumber"); + + b.ToTable("Users", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserIntegrationConfiguration", b => + { + b.Property("UserIntegrationConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("UserIntegrationConfigurationId")); + + b.Property("ArrowApiKey") + .HasColumnType("text"); + + b.Property("ArrowApiUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("ArrowEnabled") + .HasColumnType("boolean"); + + b.Property("ArrowUsername") + .HasColumnType("text"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DigiKeyApiUrl") + .HasColumnType("text"); + + b.Property("DigiKeyClientId") + .HasColumnType("text"); + + b.Property("DigiKeyClientSecret") + .HasColumnType("text"); + + b.Property("DigiKeyEnabled") + .HasColumnType("boolean"); + + b.Property("DigiKeyOAuthPostbackUrl") + .HasColumnType("text"); + + b.Property("MouserApiUrl") + .HasColumnType("text"); + + b.Property("MouserCartApiKey") + .HasColumnType("text"); + + b.Property("MouserEnabled") + .HasColumnType("boolean"); + + b.Property("MouserOrderApiKey") + .HasColumnType("text"); + + b.Property("MouserSearchApiKey") + .HasColumnType("text"); + + b.Property("OctopartClientId") + .HasColumnType("text"); + + b.Property("OctopartClientSecret") + .HasColumnType("text"); + + b.Property("OctopartEnabled") + .HasColumnType("boolean"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("SwarmApiKey") + .HasColumnType("text"); + + b.Property("SwarmApiUrl") + .HasColumnType("text"); + + b.Property("SwarmEnabled") + .HasColumnType("boolean"); + + b.Property("SwarmTimeout") + .HasColumnType("interval"); + + b.Property("TmeApiKey") + .HasColumnType("text"); + + b.Property("TmeApiUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("TmeApplicationSecret") + .HasColumnType("text"); + + b.Property("TmeCountry") + .HasColumnType("text"); + + b.Property("TmeEnabled") + .HasColumnType("boolean"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("UserIntegrationConfigurationId"); + + b.HasIndex("UserId"); + + b.ToTable("UserIntegrationConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserLoginHistory", b => + { + b.Property("UserLoginHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("UserLoginHistoryId")); + + b.Property("CanLogin") + .HasColumnType("boolean"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("EmailAddress") + .HasColumnType("text"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("IsSuccessful") + .HasColumnType("boolean"); + + b.Property("Message") + .HasColumnType("text"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("ReCaptchaScore") + .HasColumnType("double precision"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("UserLoginHistoryId"); + + b.HasIndex("UserId"); + + b.ToTable("UserLoginHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.Property("UserPrinterConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("UserPrinterConfigurationId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("PartLabelName") + .IsRequired() + .HasColumnType("text"); + + b.Property("PartLabelSource") + .HasColumnType("integer"); + + b.Property("PrinterName") + .IsRequired() + .HasColumnType("text"); + + b.Property("RemoteAddressUrl") + .HasColumnType("text"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("UserPrinterConfigurationId"); + + b.HasIndex("UserId"); + + b.ToTable("UserPrinterConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterTemplateConfiguration", b => + { + b.Property("UserPrinterTemplateConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("UserPrinterTemplateConfigurationId")); + + b.Property("AutoSize") + .HasColumnType("boolean"); + + b.Property("Barcode") + .HasColumnType("boolean"); + + b.Property("Color") + .HasColumnType("text"); + + b.Property("Content") + .HasColumnType("text"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("FontName") + .IsRequired() + .HasColumnType("text"); + + b.Property("FontSize") + .HasColumnType("integer"); + + b.Property("Label") + .HasColumnType("integer"); + + b.Property("Line") + .HasColumnType("integer"); + + b.Property("LowerCase") + .HasColumnType("boolean"); + + b.Property("MarginBottom") + .HasColumnType("integer"); + + b.Property("MarginLeft") + .HasColumnType("integer"); + + b.Property("MarginRight") + .HasColumnType("integer"); + + b.Property("MarginTop") + .HasColumnType("integer"); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("Position") + .HasColumnType("integer"); + + b.Property("Rotate") + .HasColumnType("integer"); + + b.Property("UpperCase") + .HasColumnType("boolean"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.Property("UserPrinterConfigurationId") + .HasColumnType("integer"); + + b.HasKey("UserPrinterTemplateConfigurationId"); + + b.HasIndex("UserId"); + + b.HasIndex("UserPrinterConfigurationId"); + + b.ToTable("UserPrinterTemplateConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserToken", b => + { + b.Property("UserTokenId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("UserTokenId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateExpiredUtc") + .HasColumnType("timestamp with time zone"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("timestamp with time zone") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateRevokedUtc") + .HasColumnType("timestamp with time zone"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("integer"); + + b.Property("ReplacedByToken") + .HasColumnType("text"); + + b.Property("Token") + .IsRequired() + .HasColumnType("text"); + + b.Property("TokenTypeId") + .HasColumnType("integer"); + + b.Property("UserId") + .HasColumnType("integer"); + + b.HasKey("UserTokenId"); + + b.HasIndex("UserId"); + + b.ToTable("UserTokens", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Label", b => + { + b.HasOne("Binner.Data.Model.LabelTemplate", "LabelTemplate") + .WithMany("Labels") + .HasForeignKey("LabelTemplateId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("LabelTemplate"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthCredential", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("OAuthCredentials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthRequest", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("OAuthRequests") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.HasOne("Binner.Data.Model.PartType", "PartType") + .WithMany("Parts") + .HasForeignKey("PartTypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("Parts") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Parts") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("PartType"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartSupplier", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("PartSuppliers") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PartSuppliers") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.HasOne("Binner.Data.Model.PartType", "ParentPartType") + .WithMany() + .HasForeignKey("ParentPartTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PartTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("ParentPartType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Pcbs") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PcbStoredFileAssignment", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("PcbId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.StoredFile", "StoredFile") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("StoredFileId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("StoredFile"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Projects") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPartAssignment", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("ProjectPartAssignments") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectPartAssignments") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPartAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbAssignment", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("PcbId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbProduceHistory", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("PcbId"); + + b.HasOne("Binner.Data.Model.ProjectProduceHistory", "ProjectProduceHistory") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("ProjectProduceHistoryId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("ProjectProduceHistory"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectProduceHistory") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectProduceHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("StoredFiles") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("StoredFiles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserIntegrationConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserIntegrationConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserLoginHistory", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserLoginHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserPrinterConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterTemplateConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserPrinterTemplateConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Binner.Data.Model.UserPrinterConfiguration", "UserPrinterConfiguration") + .WithMany("UserPrinterTemplateConfigurations") + .HasForeignKey("UserPrinterConfigurationId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("User"); + + b.Navigation("UserPrinterConfiguration"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserToken", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserTokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.LabelTemplate", b => + { + b.Navigation("Labels"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.Navigation("PartSuppliers"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("StoredFiles"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.Navigation("Parts"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.Navigation("PcbStoredFileAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectPcbProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.Navigation("Parts"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.Navigation("ProjectPcbProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.Navigation("PcbStoredFileAssignments"); + }); + + modelBuilder.Entity("Binner.Data.Model.User", b => + { + b.Navigation("OAuthCredentials"); + + b.Navigation("OAuthRequests"); + + b.Navigation("PartSuppliers"); + + b.Navigation("PartTypes"); + + b.Navigation("Parts"); + + b.Navigation("PcbStoredFileAssignments"); + + b.Navigation("Pcbs"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectPcbProduceHistory"); + + b.Navigation("ProjectProduceHistory"); + + b.Navigation("Projects"); + + b.Navigation("StoredFiles"); + + b.Navigation("UserIntegrationConfigurations"); + + b.Navigation("UserLoginHistory"); + + b.Navigation("UserPrinterConfigurations"); + + b.Navigation("UserPrinterTemplateConfigurations"); + + b.Navigation("UserTokens"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.Navigation("UserPrinterTemplateConfigurations"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Binner/Data/Binner.Data.Migrations.Postgresql/Migrations/20240407012318_AddTmeCountry.cs b/Binner/Data/Binner.Data.Migrations.Postgresql/Migrations/20240407012318_AddTmeCountry.cs new file mode 100644 index 00000000..74b944b7 --- /dev/null +++ b/Binner/Data/Binner.Data.Migrations.Postgresql/Migrations/20240407012318_AddTmeCountry.cs @@ -0,0 +1,80 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Binner.Data.Migrations.Postgresql.Migrations +{ + /// + public partial class AddTmeCountry : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "TmeApiKey", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "text", + nullable: true); + + migrationBuilder.AddColumn( + name: "TmeApiUrl", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "text", + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "TmeApplicationSecret", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "text", + nullable: true); + + migrationBuilder.AddColumn( + name: "TmeCountry", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "text", + nullable: true); + + migrationBuilder.AddColumn( + name: "TmeEnabled", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "boolean", + nullable: false, + defaultValue: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "TmeApiKey", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeApiUrl", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeApplicationSecret", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeCountry", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeEnabled", + schema: "dbo", + table: "UserIntegrationConfigurations"); + } + } +} diff --git a/Binner/Data/Binner.Data.Migrations.Postgresql/Migrations/BinnerContextModelSnapshot.cs b/Binner/Data/Binner.Data.Migrations.Postgresql/Migrations/BinnerContextModelSnapshot.cs index 007aead9..d75ad93c 100644 --- a/Binner/Data/Binner.Data.Migrations.Postgresql/Migrations/BinnerContextModelSnapshot.cs +++ b/Binner/Data/Binner.Data.Migrations.Postgresql/Migrations/BinnerContextModelSnapshot.cs @@ -1105,6 +1105,22 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("SwarmTimeout") .HasColumnType("interval"); + b.Property("TmeApiKey") + .HasColumnType("text"); + + b.Property("TmeApiUrl") + .IsRequired() + .HasColumnType("text"); + + b.Property("TmeApplicationSecret") + .HasColumnType("text"); + + b.Property("TmeCountry") + .HasColumnType("text"); + + b.Property("TmeEnabled") + .HasColumnType("boolean"); + b.Property("UserId") .HasColumnType("integer"); diff --git a/Binner/Data/Binner.Data.Migrations.SqlServer/Migrations/20240407012302_AddTmeCountry.Designer.cs b/Binner/Data/Binner.Data.Migrations.SqlServer/Migrations/20240407012302_AddTmeCountry.Designer.cs new file mode 100644 index 00000000..20058e0a --- /dev/null +++ b/Binner/Data/Binner.Data.Migrations.SqlServer/Migrations/20240407012302_AddTmeCountry.Designer.cs @@ -0,0 +1,1770 @@ +// +using System; +using Binner.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Binner.Data.Migrations.SqlServer.Migrations +{ + [DbContext(typeof(BinnerContext))] + [Migration("20240407012302_AddTmeCountry")] + partial class AddTmeCountry + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("dbo") + .HasAnnotation("ProductVersion", "7.0.5") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("Binner.Data.Model.Label", b => + { + b.Property("LabelId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("LabelId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("IsPartLabelTemplate") + .HasColumnType("bit"); + + b.Property("LabelTemplateId") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("Template") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("LabelId"); + + b.HasIndex("LabelTemplateId"); + + b.ToTable("Labels", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.LabelTemplate", b => + { + b.Property("LabelTemplateId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("LabelTemplateId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Dpi") + .HasColumnType("int"); + + b.Property("DriverHeight") + .HasColumnType("int"); + + b.Property("DriverName") + .HasColumnType("nvarchar(max)"); + + b.Property("DriverWidth") + .HasColumnType("int"); + + b.Property("ExtraData") + .HasColumnType("nvarchar(max)"); + + b.Property("Height") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("LabelCount") + .HasColumnType("int"); + + b.Property("LabelPaperSource") + .HasColumnType("int"); + + b.Property("Margin") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.Property("Width") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("LabelTemplateId"); + + b.ToTable("LabelTemplates", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthCredential", b => + { + b.Property("Provider") + .HasMaxLength(128) + .HasColumnType("nvarchar(128)"); + + b.Property("AccessToken") + .HasColumnType("nvarchar(max)"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateExpiresUtc") + .HasColumnType("datetime2"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("RefreshToken") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Provider"); + + b.HasIndex("UserId"); + + b.ToTable("OAuthCredentials", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthRequest", b => + { + b.Property("OAuthRequestId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("OAuthRequestId")); + + b.Property("AuthorizationCode") + .HasColumnType("nvarchar(max)"); + + b.Property("AuthorizationReceived") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Error") + .HasColumnType("nvarchar(max)"); + + b.Property("ErrorDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("Provider") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("RequestId") + .HasColumnType("uniqueidentifier"); + + b.Property("ReturnToUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("OAuthRequestId"); + + b.HasIndex("UserId"); + + b.ToTable("OAuthRequests", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Organization", b => + { + b.Property("OrganizationId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("OrganizationId")); + + b.Property("DateCreatedUtc") + .HasColumnType("datetime2"); + + b.Property("DateModifiedUtc") + .HasColumnType("datetime2"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.HasKey("OrganizationId"); + + b.ToTable("Organizations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.Property("PartId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PartId")); + + b.Property("ArrowPartNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("BinNumber") + .HasColumnType("nvarchar(450)"); + + b.Property("BinNumber2") + .HasColumnType("nvarchar(450)"); + + b.Property("Cost") + .HasColumnType("decimal(18,4)"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("DatasheetUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("nvarchar(450)"); + + b.Property("DigiKeyPartNumber") + .HasColumnType("nvarchar(450)"); + + b.Property("ExtensionValue1") + .HasColumnType("nvarchar(max)"); + + b.Property("ExtensionValue2") + .HasColumnType("nvarchar(max)"); + + b.Property("FootprintName") + .HasColumnType("nvarchar(max)"); + + b.Property("ImageUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Keywords") + .HasColumnType("nvarchar(450)"); + + b.Property("Location") + .HasColumnType("nvarchar(450)"); + + b.Property("LowStockThreshold") + .HasColumnType("int"); + + b.Property("LowestCostSupplier") + .HasColumnType("nvarchar(max)"); + + b.Property("LowestCostSupplierUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("Manufacturer") + .HasColumnType("nvarchar(450)"); + + b.Property("ManufacturerPartNumber") + .HasColumnType("nvarchar(450)"); + + b.Property("MountingTypeId") + .HasColumnType("int"); + + b.Property("MouserPartNumber") + .HasColumnType("nvarchar(450)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PackageType") + .HasColumnType("nvarchar(max)"); + + b.Property("PartNumber") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("PartTypeId") + .HasColumnType("bigint"); + + b.Property("ProductUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("bigint"); + + b.Property("SymbolName") + .HasColumnType("nvarchar(max)"); + + b.Property("TmePartNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("PartId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.HasIndex("BinNumber", "UserId"); + + b.HasIndex("BinNumber2", "UserId"); + + b.HasIndex("Description", "UserId"); + + b.HasIndex("DigiKeyPartNumber", "UserId"); + + b.HasIndex("Keywords", "UserId"); + + b.HasIndex("Location", "UserId"); + + b.HasIndex("Manufacturer", "UserId"); + + b.HasIndex("ManufacturerPartNumber", "UserId"); + + b.HasIndex("MouserPartNumber", "UserId"); + + b.HasIndex("PartNumber", "UserId"); + + b.HasIndex("PartTypeId", "UserId"); + + b.ToTable("Parts", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartSupplier", b => + { + b.Property("PartSupplierId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PartSupplierId")); + + b.Property("Cost") + .HasColumnType("decimal(18,4)"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("ImageUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("MinimumOrderQuantity") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PartId") + .HasColumnType("bigint"); + + b.Property("ProductUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("QuantityAvailable") + .HasColumnType("int"); + + b.Property("SupplierPartNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("PartSupplierId"); + + b.HasIndex("PartId"); + + b.HasIndex("UserId"); + + b.ToTable("PartSuppliers", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.Property("PartTypeId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PartTypeId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Icon") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("ParentPartTypeId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("PartTypeId"); + + b.HasIndex("ParentPartTypeId"); + + b.HasIndex("UserId"); + + b.HasIndex("Name", "UserId"); + + b.ToTable("PartTypes", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.Property("PcbId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PcbId")); + + b.Property("Cost") + .HasColumnType("float"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("LastSerialNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("SerialNumberFormat") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("PcbId"); + + b.HasIndex("UserId"); + + b.ToTable("Pcbs", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PcbStoredFileAssignment", b => + { + b.Property("PcbStoredFileAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PcbStoredFileAssignmentId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Name") + .HasColumnType("nvarchar(max)"); + + b.Property("Notes") + .HasColumnType("nvarchar(max)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("StoredFileId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("PcbStoredFileAssignmentId"); + + b.HasIndex("PcbId"); + + b.HasIndex("StoredFileId"); + + b.HasIndex("UserId"); + + b.ToTable("PcbStoredFileAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.Property("ProjectId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ProjectId")); + + b.Property("Color") + .HasColumnType("int"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("Location") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .HasColumnType("nvarchar(450)"); + + b.Property("Notes") + .HasColumnType("nvarchar(max)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("ProjectId"); + + b.HasIndex("UserId"); + + b.HasIndex("Name", "UserId"); + + b.ToTable("Projects", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPartAssignment", b => + { + b.Property("ProjectPartAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ProjectPartAssignmentId")); + + b.Property("Cost") + .HasColumnType("float"); + + b.Property("Currency") + .HasColumnType("nvarchar(max)"); + + b.Property("CustomDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Notes") + .HasColumnType("nvarchar(max)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PartId") + .HasColumnType("bigint"); + + b.Property("PartName") + .HasColumnType("nvarchar(max)"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("QuantityAvailable") + .HasColumnType("int"); + + b.Property("ReferenceId") + .HasColumnType("nvarchar(max)"); + + b.Property("SchematicReferenceId") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("ProjectPartAssignmentId"); + + b.HasIndex("PartId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPartAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbAssignment", b => + { + b.Property("ProjectPcbAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ProjectPcbAssignmentId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("ProjectPcbAssignmentId"); + + b.HasIndex("PcbId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPcbAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbProduceHistory", b => + { + b.Property("ProjectPcbProduceHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ProjectPcbProduceHistoryId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PartsConsumed") + .HasColumnType("int"); + + b.Property("PcbCost") + .HasColumnType("float"); + + b.Property("PcbId") + .HasColumnType("bigint"); + + b.Property("PcbQuantity") + .HasColumnType("int"); + + b.Property("ProjectProduceHistoryId") + .HasColumnType("bigint"); + + b.Property("SerialNumber") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("ProjectPcbProduceHistoryId"); + + b.HasIndex("PcbId"); + + b.HasIndex("ProjectProduceHistoryId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPcbProduceHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.Property("ProjectProduceHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ProjectProduceHistoryId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PartsConsumed") + .HasColumnType("int"); + + b.Property("ProduceUnassociated") + .HasColumnType("bit"); + + b.Property("ProjectId") + .HasColumnType("bigint"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("ProjectProduceHistoryId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectProduceHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.Property("StoredFileId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("StoredFileId")); + + b.Property("Crc32") + .HasColumnType("int"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("FileLength") + .HasColumnType("int"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("OriginalFileName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PartId") + .HasColumnType("bigint"); + + b.Property("RecordId") + .HasColumnType("bigint"); + + b.Property("RecordType") + .HasColumnType("int"); + + b.Property("StoredFileType") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("StoredFileId"); + + b.HasIndex("PartId"); + + b.HasIndex("UserId"); + + b.ToTable("StoredFiles", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.User", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UserId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateEmailConfirmedUtc") + .HasColumnType("datetime2"); + + b.Property("DateLastActiveUtc") + .HasColumnType("datetime2"); + + b.Property("DateLastLoginUtc") + .HasColumnType("datetime2"); + + b.Property("DateLockedUtc") + .HasColumnType("datetime2"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("EmailAddress") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("EmailConfirmationToken") + .HasColumnType("nvarchar(max)"); + + b.Property("EmailConfirmedIp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("IsAdmin") + .HasColumnType("bit"); + + b.Property("IsEmailConfirmed") + .HasColumnType("bit"); + + b.Property("IsEmailSubscribed") + .HasColumnType("bit"); + + b.Property("LastSetPasswordIp") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("LocaleCurrency") + .HasColumnType("nvarchar(max)"); + + b.Property("LocaleLanguage") + .HasColumnType("nvarchar(max)"); + + b.Property("Name") + .IsRequired() + .HasColumnType("nvarchar(450)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PhoneNumber") + .HasColumnType("nvarchar(450)"); + + b.Property("ProfileImage") + .HasColumnType("varbinary(max)"); + + b.Property("ReCaptchaScore") + .HasColumnType("float"); + + b.HasKey("UserId"); + + b.HasIndex("EmailAddress"); + + b.HasIndex("Name"); + + b.HasIndex("PhoneNumber"); + + b.ToTable("Users", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserIntegrationConfiguration", b => + { + b.Property("UserIntegrationConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UserIntegrationConfigurationId")); + + b.Property("ArrowApiKey") + .HasColumnType("nvarchar(max)"); + + b.Property("ArrowApiUrl") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("ArrowEnabled") + .HasColumnType("bit"); + + b.Property("ArrowUsername") + .HasColumnType("nvarchar(max)"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DigiKeyApiUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("DigiKeyClientId") + .HasColumnType("nvarchar(max)"); + + b.Property("DigiKeyClientSecret") + .HasColumnType("nvarchar(max)"); + + b.Property("DigiKeyEnabled") + .HasColumnType("bit"); + + b.Property("DigiKeyOAuthPostbackUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("MouserApiUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("MouserCartApiKey") + .HasColumnType("nvarchar(max)"); + + b.Property("MouserEnabled") + .HasColumnType("bit"); + + b.Property("MouserOrderApiKey") + .HasColumnType("nvarchar(max)"); + + b.Property("MouserSearchApiKey") + .HasColumnType("nvarchar(max)"); + + b.Property("OctopartClientId") + .HasColumnType("nvarchar(max)"); + + b.Property("OctopartClientSecret") + .HasColumnType("nvarchar(max)"); + + b.Property("OctopartEnabled") + .HasColumnType("bit"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("SwarmApiKey") + .HasColumnType("nvarchar(max)"); + + b.Property("SwarmApiUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("SwarmEnabled") + .HasColumnType("bit"); + + b.Property("SwarmTimeout") + .HasColumnType("time"); + + b.Property("TmeApiKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TmeApiUrl") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TmeApplicationSecret") + .HasColumnType("nvarchar(max)"); + + b.Property("TmeCountry") + .HasColumnType("nvarchar(max)"); + + b.Property("TmeEnabled") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("UserIntegrationConfigurationId"); + + b.HasIndex("UserId"); + + b.ToTable("UserIntegrationConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserLoginHistory", b => + { + b.Property("UserLoginHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UserLoginHistoryId")); + + b.Property("CanLogin") + .HasColumnType("bit"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("EmailAddress") + .HasColumnType("nvarchar(max)"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("IsSuccessful") + .HasColumnType("bit"); + + b.Property("Message") + .HasColumnType("nvarchar(max)"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("ReCaptchaScore") + .HasColumnType("float"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("UserLoginHistoryId"); + + b.HasIndex("UserId"); + + b.ToTable("UserLoginHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.Property("UserPrinterConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UserPrinterConfigurationId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("PartLabelName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("PartLabelSource") + .HasColumnType("int"); + + b.Property("PrinterName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("RemoteAddressUrl") + .HasColumnType("nvarchar(max)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("UserPrinterConfigurationId"); + + b.HasIndex("UserId"); + + b.ToTable("UserPrinterConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterTemplateConfiguration", b => + { + b.Property("UserPrinterTemplateConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UserPrinterTemplateConfigurationId")); + + b.Property("AutoSize") + .HasColumnType("bit"); + + b.Property("Barcode") + .HasColumnType("bit"); + + b.Property("Color") + .HasColumnType("nvarchar(max)"); + + b.Property("Content") + .HasColumnType("nvarchar(max)"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("FontName") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("FontSize") + .HasColumnType("int"); + + b.Property("Label") + .HasColumnType("int"); + + b.Property("Line") + .HasColumnType("int"); + + b.Property("LowerCase") + .HasColumnType("bit"); + + b.Property("MarginBottom") + .HasColumnType("int"); + + b.Property("MarginLeft") + .HasColumnType("int"); + + b.Property("MarginRight") + .HasColumnType("int"); + + b.Property("MarginTop") + .HasColumnType("int"); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("Position") + .HasColumnType("int"); + + b.Property("Rotate") + .HasColumnType("int"); + + b.Property("UpperCase") + .HasColumnType("bit"); + + b.Property("UserId") + .HasColumnType("int"); + + b.Property("UserPrinterConfigurationId") + .HasColumnType("int"); + + b.HasKey("UserPrinterTemplateConfigurationId"); + + b.HasIndex("UserId"); + + b.HasIndex("UserPrinterConfigurationId"); + + b.ToTable("UserPrinterTemplateConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserToken", b => + { + b.Property("UserTokenId") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UserTokenId")); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateExpiredUtc") + .HasColumnType("datetime2"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("datetime2") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateRevokedUtc") + .HasColumnType("datetime2"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("bigint") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("int"); + + b.Property("ReplacedByToken") + .HasColumnType("nvarchar(max)"); + + b.Property("Token") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TokenTypeId") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("UserTokenId"); + + b.HasIndex("UserId"); + + b.ToTable("UserTokens", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Label", b => + { + b.HasOne("Binner.Data.Model.LabelTemplate", "LabelTemplate") + .WithMany("Labels") + .HasForeignKey("LabelTemplateId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("LabelTemplate"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthCredential", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("OAuthCredentials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthRequest", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("OAuthRequests") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.HasOne("Binner.Data.Model.PartType", "PartType") + .WithMany("Parts") + .HasForeignKey("PartTypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("Parts") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Parts") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("PartType"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartSupplier", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("PartSuppliers") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PartSuppliers") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.HasOne("Binner.Data.Model.PartType", "ParentPartType") + .WithMany() + .HasForeignKey("ParentPartTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PartTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("ParentPartType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Pcbs") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PcbStoredFileAssignment", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("PcbId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.StoredFile", "StoredFile") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("StoredFileId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("StoredFile"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Projects") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPartAssignment", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("ProjectPartAssignments") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectPartAssignments") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPartAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbAssignment", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("PcbId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbProduceHistory", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("PcbId"); + + b.HasOne("Binner.Data.Model.ProjectProduceHistory", "ProjectProduceHistory") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("ProjectProduceHistoryId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("ProjectProduceHistory"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectProduceHistory") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectProduceHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("StoredFiles") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("StoredFiles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserIntegrationConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserIntegrationConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserLoginHistory", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserLoginHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserPrinterConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterTemplateConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserPrinterTemplateConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Binner.Data.Model.UserPrinterConfiguration", "UserPrinterConfiguration") + .WithMany("UserPrinterTemplateConfigurations") + .HasForeignKey("UserPrinterConfigurationId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("User"); + + b.Navigation("UserPrinterConfiguration"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserToken", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserTokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.LabelTemplate", b => + { + b.Navigation("Labels"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.Navigation("PartSuppliers"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("StoredFiles"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.Navigation("Parts"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.Navigation("PcbStoredFileAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectPcbProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.Navigation("Parts"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.Navigation("ProjectPcbProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.Navigation("PcbStoredFileAssignments"); + }); + + modelBuilder.Entity("Binner.Data.Model.User", b => + { + b.Navigation("OAuthCredentials"); + + b.Navigation("OAuthRequests"); + + b.Navigation("PartSuppliers"); + + b.Navigation("PartTypes"); + + b.Navigation("Parts"); + + b.Navigation("PcbStoredFileAssignments"); + + b.Navigation("Pcbs"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectPcbProduceHistory"); + + b.Navigation("ProjectProduceHistory"); + + b.Navigation("Projects"); + + b.Navigation("StoredFiles"); + + b.Navigation("UserIntegrationConfigurations"); + + b.Navigation("UserLoginHistory"); + + b.Navigation("UserPrinterConfigurations"); + + b.Navigation("UserPrinterTemplateConfigurations"); + + b.Navigation("UserTokens"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.Navigation("UserPrinterTemplateConfigurations"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Binner/Data/Binner.Data.Migrations.SqlServer/Migrations/20240407012302_AddTmeCountry.cs b/Binner/Data/Binner.Data.Migrations.SqlServer/Migrations/20240407012302_AddTmeCountry.cs new file mode 100644 index 00000000..4ce37b4c --- /dev/null +++ b/Binner/Data/Binner.Data.Migrations.SqlServer/Migrations/20240407012302_AddTmeCountry.cs @@ -0,0 +1,80 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Binner.Data.Migrations.SqlServer.Migrations +{ + /// + public partial class AddTmeCountry : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "TmeApiKey", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "TmeApiUrl", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "nvarchar(max)", + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "TmeApplicationSecret", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "TmeCountry", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "nvarchar(max)", + nullable: true); + + migrationBuilder.AddColumn( + name: "TmeEnabled", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "bit", + nullable: false, + defaultValue: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "TmeApiKey", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeApiUrl", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeApplicationSecret", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeCountry", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeEnabled", + schema: "dbo", + table: "UserIntegrationConfigurations"); + } + } +} diff --git a/Binner/Data/Binner.Data.Migrations.SqlServer/Migrations/BinnerContextModelSnapshot.cs b/Binner/Data/Binner.Data.Migrations.SqlServer/Migrations/BinnerContextModelSnapshot.cs index 0fbb8b26..73130c5a 100644 --- a/Binner/Data/Binner.Data.Migrations.SqlServer/Migrations/BinnerContextModelSnapshot.cs +++ b/Binner/Data/Binner.Data.Migrations.SqlServer/Migrations/BinnerContextModelSnapshot.cs @@ -1105,6 +1105,22 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("SwarmTimeout") .HasColumnType("time"); + b.Property("TmeApiKey") + .HasColumnType("nvarchar(max)"); + + b.Property("TmeApiUrl") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("TmeApplicationSecret") + .HasColumnType("nvarchar(max)"); + + b.Property("TmeCountry") + .HasColumnType("nvarchar(max)"); + + b.Property("TmeEnabled") + .HasColumnType("bit"); + b.Property("UserId") .HasColumnType("int"); diff --git a/Binner/Data/Binner.Data.Migrations.Sqlite/Migrations/20240407012242_AddTmeCountry.Designer.cs b/Binner/Data/Binner.Data.Migrations.Sqlite/Migrations/20240407012242_AddTmeCountry.Designer.cs new file mode 100644 index 00000000..5c1a543b --- /dev/null +++ b/Binner/Data/Binner.Data.Migrations.Sqlite/Migrations/20240407012242_AddTmeCountry.Designer.cs @@ -0,0 +1,1724 @@ +// +using System; +using Binner.Data; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; + +#nullable disable + +namespace Binner.Data.Migrations.Sqlite.Migrations +{ + [DbContext(typeof(BinnerContext))] + [Migration("20240407012242_AddTmeCountry")] + partial class AddTmeCountry + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasDefaultSchema("dbo") + .HasAnnotation("ProductVersion", "7.0.5"); + + modelBuilder.Entity("Binner.Data.Model.Label", b => + { + b.Property("LabelId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("IsPartLabelTemplate") + .HasColumnType("INTEGER"); + + b.Property("LabelTemplateId") + .HasColumnType("INTEGER"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("Template") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("LabelId"); + + b.HasIndex("LabelTemplateId"); + + b.ToTable("Labels", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.LabelTemplate", b => + { + b.Property("LabelTemplateId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("Dpi") + .HasColumnType("INTEGER"); + + b.Property("DriverHeight") + .HasColumnType("INTEGER"); + + b.Property("DriverName") + .HasColumnType("TEXT"); + + b.Property("DriverWidth") + .HasColumnType("INTEGER"); + + b.Property("ExtraData") + .HasColumnType("TEXT"); + + b.Property("Height") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("LabelCount") + .HasColumnType("INTEGER"); + + b.Property("LabelPaperSource") + .HasColumnType("INTEGER"); + + b.Property("Margin") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.Property("Width") + .IsRequired() + .HasColumnType("TEXT"); + + b.HasKey("LabelTemplateId"); + + b.ToTable("LabelTemplates", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthCredential", b => + { + b.Property("Provider") + .HasMaxLength(128) + .HasColumnType("TEXT"); + + b.Property("AccessToken") + .HasColumnType("TEXT"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateExpiresUtc") + .HasColumnType("TEXT"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("RefreshToken") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("Provider"); + + b.HasIndex("UserId"); + + b.ToTable("OAuthCredentials", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthRequest", b => + { + b.Property("OAuthRequestId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AuthorizationCode") + .HasColumnType("TEXT"); + + b.Property("AuthorizationReceived") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(false); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Error") + .HasColumnType("TEXT"); + + b.Property("ErrorDescription") + .HasColumnType("TEXT"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("Provider") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("RequestId") + .HasColumnType("TEXT"); + + b.Property("ReturnToUrl") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("OAuthRequestId"); + + b.HasIndex("UserId"); + + b.ToTable("OAuthRequests", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Organization", b => + { + b.Property("OrganizationId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .HasColumnType("TEXT"); + + b.Property("DateModifiedUtc") + .HasColumnType("TEXT"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.HasKey("OrganizationId"); + + b.ToTable("Organizations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.Property("PartId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ArrowPartNumber") + .HasColumnType("TEXT"); + + b.Property("BinNumber") + .HasColumnType("TEXT"); + + b.Property("BinNumber2") + .HasColumnType("TEXT"); + + b.Property("Cost") + .HasColumnType("decimal(18,4)"); + + b.Property("Currency") + .HasColumnType("TEXT"); + + b.Property("DatasheetUrl") + .HasColumnType("TEXT"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("DigiKeyPartNumber") + .HasColumnType("TEXT"); + + b.Property("ExtensionValue1") + .HasColumnType("TEXT"); + + b.Property("ExtensionValue2") + .HasColumnType("TEXT"); + + b.Property("FootprintName") + .HasColumnType("TEXT"); + + b.Property("ImageUrl") + .HasColumnType("TEXT"); + + b.Property("Keywords") + .HasColumnType("TEXT"); + + b.Property("Location") + .HasColumnType("TEXT"); + + b.Property("LowStockThreshold") + .HasColumnType("INTEGER"); + + b.Property("LowestCostSupplier") + .HasColumnType("TEXT"); + + b.Property("LowestCostSupplierUrl") + .HasColumnType("TEXT"); + + b.Property("Manufacturer") + .HasColumnType("TEXT"); + + b.Property("ManufacturerPartNumber") + .HasColumnType("TEXT"); + + b.Property("MountingTypeId") + .HasColumnType("INTEGER"); + + b.Property("MouserPartNumber") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("PackageType") + .HasColumnType("TEXT"); + + b.Property("PartNumber") + .HasMaxLength(64) + .HasColumnType("TEXT"); + + b.Property("PartTypeId") + .HasColumnType("INTEGER"); + + b.Property("ProductUrl") + .HasColumnType("TEXT"); + + b.Property("ProjectId") + .HasColumnType("INTEGER"); + + b.Property("Quantity") + .HasColumnType("INTEGER"); + + b.Property("SymbolName") + .HasColumnType("TEXT"); + + b.Property("TmePartNumber") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("PartId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.HasIndex("BinNumber", "UserId"); + + b.HasIndex("BinNumber2", "UserId"); + + b.HasIndex("Description", "UserId"); + + b.HasIndex("DigiKeyPartNumber", "UserId"); + + b.HasIndex("Keywords", "UserId"); + + b.HasIndex("Location", "UserId"); + + b.HasIndex("Manufacturer", "UserId"); + + b.HasIndex("ManufacturerPartNumber", "UserId"); + + b.HasIndex("MouserPartNumber", "UserId"); + + b.HasIndex("PartNumber", "UserId"); + + b.HasIndex("PartTypeId", "UserId"); + + b.ToTable("Parts", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartSupplier", b => + { + b.Property("PartSupplierId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Cost") + .HasColumnType("decimal(18,4)"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("ImageUrl") + .HasColumnType("TEXT"); + + b.Property("MinimumOrderQuantity") + .HasColumnType("INTEGER"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("PartId") + .HasColumnType("INTEGER"); + + b.Property("ProductUrl") + .HasColumnType("TEXT"); + + b.Property("QuantityAvailable") + .HasColumnType("INTEGER"); + + b.Property("SupplierPartNumber") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("PartSupplierId"); + + b.HasIndex("PartId"); + + b.HasIndex("UserId"); + + b.ToTable("PartSuppliers", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.Property("PartTypeId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Icon") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("ParentPartTypeId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("PartTypeId"); + + b.HasIndex("ParentPartTypeId"); + + b.HasIndex("UserId"); + + b.HasIndex("Name", "UserId"); + + b.ToTable("PartTypes", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.Property("PcbId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Cost") + .HasColumnType("REAL"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("LastSerialNumber") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("Quantity") + .HasColumnType("INTEGER"); + + b.Property("SerialNumberFormat") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("PcbId"); + + b.HasIndex("UserId"); + + b.ToTable("Pcbs", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.PcbStoredFileAssignment", b => + { + b.Property("PcbStoredFileAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("Notes") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("PcbId") + .HasColumnType("INTEGER"); + + b.Property("StoredFileId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("PcbStoredFileAssignmentId"); + + b.HasIndex("PcbId"); + + b.HasIndex("StoredFileId"); + + b.HasIndex("UserId"); + + b.ToTable("PcbStoredFileAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.Property("ProjectId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Color") + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("Location") + .HasColumnType("TEXT"); + + b.Property("Name") + .HasColumnType("TEXT"); + + b.Property("Notes") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("ProjectId"); + + b.HasIndex("UserId"); + + b.HasIndex("Name", "UserId"); + + b.ToTable("Projects", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPartAssignment", b => + { + b.Property("ProjectPartAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Cost") + .HasColumnType("REAL"); + + b.Property("Currency") + .HasColumnType("TEXT"); + + b.Property("CustomDescription") + .HasColumnType("TEXT"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("Notes") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("PartId") + .HasColumnType("INTEGER"); + + b.Property("PartName") + .HasColumnType("TEXT"); + + b.Property("PcbId") + .HasColumnType("INTEGER"); + + b.Property("ProjectId") + .HasColumnType("INTEGER"); + + b.Property("Quantity") + .HasColumnType("INTEGER"); + + b.Property("QuantityAvailable") + .HasColumnType("INTEGER"); + + b.Property("ReferenceId") + .HasColumnType("TEXT"); + + b.Property("SchematicReferenceId") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("ProjectPartAssignmentId"); + + b.HasIndex("PartId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPartAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbAssignment", b => + { + b.Property("ProjectPcbAssignmentId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("PcbId") + .HasColumnType("INTEGER"); + + b.Property("ProjectId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("ProjectPcbAssignmentId"); + + b.HasIndex("PcbId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPcbAssignments", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbProduceHistory", b => + { + b.Property("ProjectPcbProduceHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("PartsConsumed") + .HasColumnType("INTEGER"); + + b.Property("PcbCost") + .HasColumnType("REAL"); + + b.Property("PcbId") + .HasColumnType("INTEGER"); + + b.Property("PcbQuantity") + .HasColumnType("INTEGER"); + + b.Property("ProjectProduceHistoryId") + .HasColumnType("INTEGER"); + + b.Property("SerialNumber") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("ProjectPcbProduceHistoryId"); + + b.HasIndex("PcbId"); + + b.HasIndex("ProjectProduceHistoryId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectPcbProduceHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.Property("ProjectProduceHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("PartsConsumed") + .HasColumnType("INTEGER"); + + b.Property("ProduceUnassociated") + .HasColumnType("INTEGER"); + + b.Property("ProjectId") + .HasColumnType("INTEGER"); + + b.Property("Quantity") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("ProjectProduceHistoryId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("UserId"); + + b.ToTable("ProjectProduceHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.Property("StoredFileId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("Crc32") + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("FileLength") + .HasColumnType("INTEGER"); + + b.Property("FileName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("OriginalFileName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("PartId") + .HasColumnType("INTEGER"); + + b.Property("RecordId") + .HasColumnType("INTEGER"); + + b.Property("RecordType") + .HasColumnType("INTEGER"); + + b.Property("StoredFileType") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("StoredFileId"); + + b.HasIndex("PartId"); + + b.HasIndex("UserId"); + + b.ToTable("StoredFiles", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.User", b => + { + b.Property("UserId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateEmailConfirmedUtc") + .HasColumnType("TEXT"); + + b.Property("DateLastActiveUtc") + .HasColumnType("TEXT"); + + b.Property("DateLastLoginUtc") + .HasColumnType("TEXT"); + + b.Property("DateLockedUtc") + .HasColumnType("TEXT"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("EmailAddress") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("EmailConfirmationToken") + .HasColumnType("TEXT"); + + b.Property("EmailConfirmedIp") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); + + b.Property("IsAdmin") + .HasColumnType("INTEGER"); + + b.Property("IsEmailConfirmed") + .HasColumnType("INTEGER"); + + b.Property("IsEmailSubscribed") + .HasColumnType("INTEGER"); + + b.Property("LastSetPasswordIp") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); + + b.Property("LocaleCurrency") + .HasColumnType("TEXT"); + + b.Property("LocaleLanguage") + .HasColumnType("TEXT"); + + b.Property("Name") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("PasswordHash") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("PhoneNumber") + .HasColumnType("TEXT"); + + b.Property("ProfileImage") + .HasColumnType("BLOB"); + + b.Property("ReCaptchaScore") + .HasColumnType("REAL"); + + b.HasKey("UserId"); + + b.HasIndex("EmailAddress"); + + b.HasIndex("Name"); + + b.HasIndex("PhoneNumber"); + + b.ToTable("Users", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserIntegrationConfiguration", b => + { + b.Property("UserIntegrationConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("ArrowApiKey") + .HasColumnType("TEXT"); + + b.Property("ArrowApiUrl") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("ArrowEnabled") + .HasColumnType("INTEGER"); + + b.Property("ArrowUsername") + .HasColumnType("TEXT"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DigiKeyApiUrl") + .HasColumnType("TEXT"); + + b.Property("DigiKeyClientId") + .HasColumnType("TEXT"); + + b.Property("DigiKeyClientSecret") + .HasColumnType("TEXT"); + + b.Property("DigiKeyEnabled") + .HasColumnType("INTEGER"); + + b.Property("DigiKeyOAuthPostbackUrl") + .HasColumnType("TEXT"); + + b.Property("MouserApiUrl") + .HasColumnType("TEXT"); + + b.Property("MouserCartApiKey") + .HasColumnType("TEXT"); + + b.Property("MouserEnabled") + .HasColumnType("INTEGER"); + + b.Property("MouserOrderApiKey") + .HasColumnType("TEXT"); + + b.Property("MouserSearchApiKey") + .HasColumnType("TEXT"); + + b.Property("OctopartClientId") + .HasColumnType("TEXT"); + + b.Property("OctopartClientSecret") + .HasColumnType("TEXT"); + + b.Property("OctopartEnabled") + .HasColumnType("INTEGER"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("SwarmApiKey") + .HasColumnType("TEXT"); + + b.Property("SwarmApiUrl") + .HasColumnType("TEXT"); + + b.Property("SwarmEnabled") + .HasColumnType("INTEGER"); + + b.Property("SwarmTimeout") + .HasColumnType("TEXT"); + + b.Property("TmeApiKey") + .HasColumnType("TEXT"); + + b.Property("TmeApiUrl") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("TmeApplicationSecret") + .HasColumnType("TEXT"); + + b.Property("TmeCountry") + .HasColumnType("TEXT"); + + b.Property("TmeEnabled") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("UserIntegrationConfigurationId"); + + b.HasIndex("UserId"); + + b.ToTable("UserIntegrationConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserLoginHistory", b => + { + b.Property("UserLoginHistoryId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("CanLogin") + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("EmailAddress") + .HasColumnType("TEXT"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); + + b.Property("IsSuccessful") + .HasColumnType("INTEGER"); + + b.Property("Message") + .HasColumnType("TEXT"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("ReCaptchaScore") + .HasColumnType("REAL"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("UserLoginHistoryId"); + + b.HasIndex("UserId"); + + b.ToTable("UserLoginHistory", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.Property("UserPrinterConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("PartLabelName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("PartLabelSource") + .HasColumnType("INTEGER"); + + b.Property("PrinterName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("RemoteAddressUrl") + .HasColumnType("TEXT"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("UserPrinterConfigurationId"); + + b.HasIndex("UserId"); + + b.ToTable("UserPrinterConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterTemplateConfiguration", b => + { + b.Property("UserPrinterTemplateConfigurationId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("AutoSize") + .HasColumnType("INTEGER"); + + b.Property("Barcode") + .HasColumnType("INTEGER"); + + b.Property("Color") + .HasColumnType("TEXT"); + + b.Property("Content") + .HasColumnType("TEXT"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("FontName") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("FontSize") + .HasColumnType("INTEGER"); + + b.Property("Label") + .HasColumnType("INTEGER"); + + b.Property("Line") + .HasColumnType("INTEGER"); + + b.Property("LowerCase") + .HasColumnType("INTEGER"); + + b.Property("MarginBottom") + .HasColumnType("INTEGER"); + + b.Property("MarginLeft") + .HasColumnType("INTEGER"); + + b.Property("MarginRight") + .HasColumnType("INTEGER"); + + b.Property("MarginTop") + .HasColumnType("INTEGER"); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("Position") + .HasColumnType("INTEGER"); + + b.Property("Rotate") + .HasColumnType("INTEGER"); + + b.Property("UpperCase") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.Property("UserPrinterConfigurationId") + .HasColumnType("INTEGER"); + + b.HasKey("UserPrinterTemplateConfigurationId"); + + b.HasIndex("UserId"); + + b.HasIndex("UserPrinterConfigurationId"); + + b.ToTable("UserPrinterTemplateConfigurations", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserToken", b => + { + b.Property("UserTokenId") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER"); + + b.Property("DateCreatedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateExpiredUtc") + .HasColumnType("TEXT"); + + b.Property("DateModifiedUtc") + .ValueGeneratedOnAdd() + .HasColumnType("TEXT") + .HasDefaultValueSql("getutcdate()"); + + b.Property("DateRevokedUtc") + .HasColumnType("TEXT"); + + b.Property("Ip") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(0L); + + b.Property("OrganizationId") + .HasColumnType("INTEGER"); + + b.Property("ReplacedByToken") + .HasColumnType("TEXT"); + + b.Property("Token") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("TokenTypeId") + .HasColumnType("INTEGER"); + + b.Property("UserId") + .HasColumnType("INTEGER"); + + b.HasKey("UserTokenId"); + + b.HasIndex("UserId"); + + b.ToTable("UserTokens", "dbo"); + }); + + modelBuilder.Entity("Binner.Data.Model.Label", b => + { + b.HasOne("Binner.Data.Model.LabelTemplate", "LabelTemplate") + .WithMany("Labels") + .HasForeignKey("LabelTemplateId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("LabelTemplate"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthCredential", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("OAuthCredentials") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.OAuthRequest", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("OAuthRequests") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.HasOne("Binner.Data.Model.PartType", "PartType") + .WithMany("Parts") + .HasForeignKey("PartTypeId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("Parts") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Parts") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("PartType"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartSupplier", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("PartSuppliers") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PartSuppliers") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.HasOne("Binner.Data.Model.PartType", "ParentPartType") + .WithMany() + .HasForeignKey("ParentPartTypeId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PartTypes") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("ParentPartType"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Pcbs") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.PcbStoredFileAssignment", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("PcbId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.StoredFile", "StoredFile") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("StoredFileId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("PcbStoredFileAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("StoredFile"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("Projects") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPartAssignment", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("ProjectPartAssignments") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectPartAssignments") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPartAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbAssignment", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("PcbId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPcbAssignments") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectPcbProduceHistory", b => + { + b.HasOne("Binner.Data.Model.Pcb", "Pcb") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("PcbId"); + + b.HasOne("Binner.Data.Model.ProjectProduceHistory", "ProjectProduceHistory") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("ProjectProduceHistoryId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectPcbProduceHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Pcb"); + + b.Navigation("ProjectProduceHistory"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.HasOne("Binner.Data.Model.Project", "Project") + .WithMany("ProjectProduceHistory") + .HasForeignKey("ProjectId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("ProjectProduceHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Project"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.HasOne("Binner.Data.Model.Part", "Part") + .WithMany("StoredFiles") + .HasForeignKey("PartId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("StoredFiles") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("Part"); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserIntegrationConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserIntegrationConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserLoginHistory", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserLoginHistory") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserPrinterConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterTemplateConfiguration", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserPrinterTemplateConfigurations") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.HasOne("Binner.Data.Model.UserPrinterConfiguration", "UserPrinterConfiguration") + .WithMany("UserPrinterTemplateConfigurations") + .HasForeignKey("UserPrinterConfigurationId") + .OnDelete(DeleteBehavior.NoAction) + .IsRequired(); + + b.Navigation("User"); + + b.Navigation("UserPrinterConfiguration"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserToken", b => + { + b.HasOne("Binner.Data.Model.User", "User") + .WithMany("UserTokens") + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.SetNull); + + b.Navigation("User"); + }); + + modelBuilder.Entity("Binner.Data.Model.LabelTemplate", b => + { + b.Navigation("Labels"); + }); + + modelBuilder.Entity("Binner.Data.Model.Part", b => + { + b.Navigation("PartSuppliers"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("StoredFiles"); + }); + + modelBuilder.Entity("Binner.Data.Model.PartType", b => + { + b.Navigation("Parts"); + }); + + modelBuilder.Entity("Binner.Data.Model.Pcb", b => + { + b.Navigation("PcbStoredFileAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectPcbProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.Project", b => + { + b.Navigation("Parts"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.ProjectProduceHistory", b => + { + b.Navigation("ProjectPcbProduceHistory"); + }); + + modelBuilder.Entity("Binner.Data.Model.StoredFile", b => + { + b.Navigation("PcbStoredFileAssignments"); + }); + + modelBuilder.Entity("Binner.Data.Model.User", b => + { + b.Navigation("OAuthCredentials"); + + b.Navigation("OAuthRequests"); + + b.Navigation("PartSuppliers"); + + b.Navigation("PartTypes"); + + b.Navigation("Parts"); + + b.Navigation("PcbStoredFileAssignments"); + + b.Navigation("Pcbs"); + + b.Navigation("ProjectPartAssignments"); + + b.Navigation("ProjectPcbAssignments"); + + b.Navigation("ProjectPcbProduceHistory"); + + b.Navigation("ProjectProduceHistory"); + + b.Navigation("Projects"); + + b.Navigation("StoredFiles"); + + b.Navigation("UserIntegrationConfigurations"); + + b.Navigation("UserLoginHistory"); + + b.Navigation("UserPrinterConfigurations"); + + b.Navigation("UserPrinterTemplateConfigurations"); + + b.Navigation("UserTokens"); + }); + + modelBuilder.Entity("Binner.Data.Model.UserPrinterConfiguration", b => + { + b.Navigation("UserPrinterTemplateConfigurations"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/Binner/Data/Binner.Data.Migrations.Sqlite/Migrations/20240407012242_AddTmeCountry.cs b/Binner/Data/Binner.Data.Migrations.Sqlite/Migrations/20240407012242_AddTmeCountry.cs new file mode 100644 index 00000000..3aa69907 --- /dev/null +++ b/Binner/Data/Binner.Data.Migrations.Sqlite/Migrations/20240407012242_AddTmeCountry.cs @@ -0,0 +1,80 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Binner.Data.Migrations.Sqlite.Migrations +{ + /// + public partial class AddTmeCountry : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "TmeApiKey", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "TEXT", + nullable: true); + + migrationBuilder.AddColumn( + name: "TmeApiUrl", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "TEXT", + nullable: false, + defaultValue: ""); + + migrationBuilder.AddColumn( + name: "TmeApplicationSecret", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "TEXT", + nullable: true); + + migrationBuilder.AddColumn( + name: "TmeCountry", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "TEXT", + nullable: true); + + migrationBuilder.AddColumn( + name: "TmeEnabled", + schema: "dbo", + table: "UserIntegrationConfigurations", + type: "INTEGER", + nullable: false, + defaultValue: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "TmeApiKey", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeApiUrl", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeApplicationSecret", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeCountry", + schema: "dbo", + table: "UserIntegrationConfigurations"); + + migrationBuilder.DropColumn( + name: "TmeEnabled", + schema: "dbo", + table: "UserIntegrationConfigurations"); + } + } +} diff --git a/Binner/Data/Binner.Data.Migrations.Sqlite/Migrations/BinnerContextModelSnapshot.cs b/Binner/Data/Binner.Data.Migrations.Sqlite/Migrations/BinnerContextModelSnapshot.cs index 20b757ab..1a779f28 100644 --- a/Binner/Data/Binner.Data.Migrations.Sqlite/Migrations/BinnerContextModelSnapshot.cs +++ b/Binner/Data/Binner.Data.Migrations.Sqlite/Migrations/BinnerContextModelSnapshot.cs @@ -1067,6 +1067,22 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("SwarmTimeout") .HasColumnType("TEXT"); + b.Property("TmeApiKey") + .HasColumnType("TEXT"); + + b.Property("TmeApiUrl") + .IsRequired() + .HasColumnType("TEXT"); + + b.Property("TmeApplicationSecret") + .HasColumnType("TEXT"); + + b.Property("TmeCountry") + .HasColumnType("TEXT"); + + b.Property("TmeEnabled") + .HasColumnType("INTEGER"); + b.Property("UserId") .HasColumnType("INTEGER"); diff --git a/Binner/Data/Binner.Data.Model/UserIntegrationConfiguration.cs b/Binner/Data/Binner.Data.Model/UserIntegrationConfiguration.cs index 62fdec03..84ce2e66 100644 --- a/Binner/Data/Binner.Data.Model/UserIntegrationConfiguration.cs +++ b/Binner/Data/Binner.Data.Model/UserIntegrationConfiguration.cs @@ -131,6 +131,31 @@ public class UserIntegrationConfiguration : IEntity, IUserData /// public string? OctopartClientSecret { get; set; } + /// + /// TME api enabled + /// + public bool TmeEnabled { get; set; } = true; + + /// + /// The user's TME country + /// + public string? TmeCountry { get; set; } = "us"; + + /// + /// The user's TME application secret + /// + public string? TmeApplicationSecret { get; set; } + + /// + /// The Api key + /// + public string? TmeApiKey { get; set; } + + /// + /// TME api url + /// + public string TmeApiUrl { get; set; } = "https://api.tme.eu"; + /// /// Creation date /// diff --git a/Binner/Library/Binner.Common/Integrations/ApiCredential.cs b/Binner/Library/Binner.Common/Integrations/ApiCredential.cs index 8f4ff0aa..f4e0b439 100644 --- a/Binner/Library/Binner.Common/Integrations/ApiCredential.cs +++ b/Binner/Library/Binner.Common/Integrations/ApiCredential.cs @@ -22,17 +22,6 @@ public sealed class ApiCredential /// public IDictionary Credentials { get; } - /// - /// Create an Api Credential - /// - /// User Id - /// Key/value mappings of credential values - public ApiCredential(int userId, IDictionary credentials) - { - UserId = userId; - Credentials = credentials; - } - /// /// Create an Api Credential /// diff --git a/Binner/Library/Binner.Common/Integrations/ArrowApi.cs b/Binner/Library/Binner.Common/Integrations/ArrowApi.cs index ba3f2eff..c927630b 100644 --- a/Binner/Library/Binner.Common/Integrations/ArrowApi.cs +++ b/Binner/Library/Binner.Common/Integrations/ArrowApi.cs @@ -73,9 +73,9 @@ public async Task SearchAsync(string keyword, string partType, str public async Task GetOrderAsync(string orderId, Dictionary? additionalOptions = null) { - if (string.IsNullOrEmpty(_configuration.Username)) throw new BinnerConfigurationException("ArrowConfiguration must specify a Username!"); - if (string.IsNullOrEmpty(_configuration.ApiKey)) throw new BinnerConfigurationException("ArrowConfiguration must specify a ApiKey!"); - if (string.IsNullOrEmpty(_configuration.ApiUrl)) throw new BinnerConfigurationException("ArrowConfiguration must specify a ApiUrl!"); + if (string.IsNullOrEmpty(_configuration.Username)) throw new BinnerConfigurationException($"{nameof(ArrowConfiguration)} must specify a Username!"); + if (string.IsNullOrEmpty(_configuration.ApiKey)) throw new BinnerConfigurationException($"{nameof(ArrowConfiguration)} must specify a ApiKey!"); + if (string.IsNullOrEmpty(_configuration.ApiUrl)) throw new BinnerConfigurationException($"{nameof(ArrowConfiguration)} must specify a ApiUrl!"); if (additionalOptions == null) throw new ArgumentNullException(nameof(additionalOptions)); if (!additionalOptions.ContainsKey("password") || string.IsNullOrEmpty(additionalOptions["password"])) throw new ArgumentNullException(nameof(additionalOptions), "User password value is required!"); var username = _configuration.Username; diff --git a/Binner/Library/Binner.Common/Integrations/TmeApi.cs b/Binner/Library/Binner.Common/Integrations/TmeApi.cs new file mode 100644 index 00000000..b3a07ef5 --- /dev/null +++ b/Binner/Library/Binner.Common/Integrations/TmeApi.cs @@ -0,0 +1,298 @@ +using Binner.Common.Extensions; +using Binner.Common.Integrations.Models; +using Binner.Model.Configuration; +using Binner.Model.Configuration.Integrations; +using Binner.Model.Integrations.Tme; +using Microsoft.AspNetCore.Http; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Security.Cryptography; +using System.Security.Cryptography.Xml; +using System.Text; +using System.Threading.Tasks; +using static Binner.Common.Integrations.ArrowApi; + +namespace Binner.Common.Integrations +{ + public class TmeApi : IIntegrationApi + { + public const string BasePath = "/"; + private readonly TmeConfiguration _configuration; + private readonly LocaleConfiguration _localeConfiguration; + private readonly HttpClient _client; + private readonly IHttpContextAccessor _httpContextAccessor; + + public bool IsEnabled => _configuration.Enabled; + + public IApiConfiguration Configuration => _configuration; + + private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings + { + Formatting = Formatting.Indented, + // ContractResolver = new DefaultContractResolver { NamingStrategy = new CamelCaseNamingStrategy() }, + Converters = new List { new StringEnumConverter() } + }; + + /// + /// TME Api + /// Documentation available at https://developers.tme.eu/documentation/download + /// + /// + /// + /// + /// + public TmeApi(TmeConfiguration configuration, LocaleConfiguration localeConfiguration, IHttpContextAccessor httpContextAccessor) + { + _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); + _localeConfiguration = localeConfiguration ?? throw new ArgumentNullException(nameof(localeConfiguration)); + _httpContextAccessor = httpContextAccessor; + _client = new HttpClient(); + _client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); + // API service is available only via the TLSv1.2 protocol. This information can be found on https://developers.tme.eu/en/signin + ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; + } + + + public Task GetOrderAsync(string orderId, Dictionary? additionalOptions = null) + { + throw new NotImplementedException(); + } + + public Task GetProductDetailsAsync(string partNumber, Dictionary? additionalOptions = null) + { + throw new NotImplementedException(); + } + + public Task SearchAsync(string keyword, int recordCount = 20, Dictionary? additionalOptions = null) => SearchAsync(keyword, string.Empty, string.Empty, recordCount, additionalOptions); + + public Task SearchAsync(string keyword, string partType, int recordCount = 20, Dictionary? additionalOptions = null) => SearchAsync(keyword, partType, string.Empty, recordCount, additionalOptions); + + public async Task SearchAsync(string partNumber, string partType, string mountingType, int recordCount = 20, Dictionary? additionalOptions = null) + { + if (string.IsNullOrEmpty(_configuration.ApplicationSecret)) throw new BinnerConfigurationException($"{nameof(TmeConfiguration)} must specify a ApplicationSecret!"); + if (string.IsNullOrEmpty(_configuration.ApiKey)) throw new BinnerConfigurationException($"{nameof(TmeConfiguration)} must specify a ApiKey!"); + if (string.IsNullOrEmpty(_configuration.ApiUrl)) throw new BinnerConfigurationException($"{nameof(TmeConfiguration)} must specify a ApiUrl!"); + + if (!(recordCount > 0)) throw new ArgumentOutOfRangeException(nameof(recordCount)); + + // note: PageSize = 20 and cannot be altered with the TME api. Only PageNumber (SearchPage) can be specified. + var format = "json"; + var prefix = "Products"; + var action = "Search"; + var path = $"{prefix}/{action}.{format}"; + var uri = Url.Combine(_configuration.ApiUrl, BasePath, path); + + // build the api params request + // Text describing the searched product, may consist of multiple words. Example: "led diode","cover", "1N4007". (optional) + var apiParams = new Dictionary { + { "SearchPlain", partNumber }, + { "SearchOrder", SearchOrder.ACCURACY.ToString() }, + { "SearchOrderType", SearchDirection.ASC.ToString() }, + { "SearchPage", 1 }, + }; + //apiParams.Add("SearchWithStock", "false"); + // Category identifier in which the products should be searched, such as "100328". (optional) + //apiParams.Add("SearchCategory", partType); + // Parameter by which search results are filtered - SearchParameter[PARAMETER_ID][] = VALUE_ID (optional) + //apiParams.Add("SearchParameter", mountingType); + // This param allows to filter products with stock only. Filtering occurs according to data that can differ from actual data displayed on www.tme.eu(optional) + //apiParams.Add("SearchWithStock", mountingType); + // Parameter determines value type by which results will be sorted. Possible values ACCURACY, SYMBOL, ORIGINAL_SYMBOL, PRICE_FIRST_QUANTITY, PRICE_LAST_QUANTITY (optional) + // apiParams.Add("SearchOrder", "ACCURACY"); + // Parameter which determines direction of sorting (ASC or DESC) (optional) + //apiParams.Add("SearchOrderType", "ASC"); + var urlEncodedContent = BuildApiParams(uri, _configuration.Country, TmeLanguages.MapLanguage(_localeConfiguration.Language), apiParams); + + // create POST message + var requestMessage = CreateRequest(HttpMethod.Post, uri, urlEncodedContent); + + var response = await _client.SendAsync(requestMessage); + if (TryHandleResponse(response, out var apiResponse)) + { + return apiResponse; + } + + var resultString = response.Content.ReadAsStringAsync().Result; + var results = JsonConvert.DeserializeObject>(resultString, _serializerSettings) ?? new(); + return new ApiResponse(results, nameof(TmeApi)); + } + + public async Task GetCategoriesAsync() + { + if (string.IsNullOrEmpty(_configuration.ApplicationSecret)) throw new BinnerConfigurationException($"{nameof(TmeConfiguration)} must specify a ApplicationSecret!"); + if (string.IsNullOrEmpty(_configuration.ApiKey)) throw new BinnerConfigurationException($"{nameof(TmeConfiguration)} must specify a ApiKey!"); + if (string.IsNullOrEmpty(_configuration.ApiUrl)) throw new BinnerConfigurationException($"{nameof(TmeConfiguration)} must specify a ApiUrl!"); + + var format = "json"; + var prefix = "Products"; + var action = "GetCategories"; + var path = $"{prefix}/{action}.{format}"; + var uri = Url.Combine(_configuration.ApiUrl, BasePath, path); + + // build the api params request + var isTree = false; + // Text describing the searched product, may consist of multiple words. Example: "led diode","cover", "1N4007". (optional) + var apiParams = new Dictionary { { "Tree", isTree } }; + // Optional ID of category that'll narrow action result to it and its children. + //apiParams.Add("CategoryId", 1); + // Determines form of response. If true then tree will be returned. Param is optional, default - true. + //apiParams.Add("Tree", false); + var urlEncodedContent = BuildApiParams(uri, _configuration.Country, TmeLanguages.MapLanguage(_localeConfiguration.Language), apiParams); + + // create POST message + var requestMessage = CreateRequest(HttpMethod.Post, uri, urlEncodedContent); + + var response = await _client.SendAsync(requestMessage); + if (TryHandleResponse(response, out var apiResponse)) + { + return apiResponse; + } + + var resultString = response.Content.ReadAsStringAsync().Result; + if (isTree) + { + var results = JsonConvert.DeserializeObject>(resultString, _serializerSettings) ?? new(); + return new ApiResponse(results, nameof(TmeApi)); + } + else + { + var results = JsonConvert.DeserializeObject>(resultString, _serializerSettings) ?? new(); + +#pragma warning disable CS0162 // Unreachable code detected + // produce a hashtable of all categories, which will be statically compiled into the StaticCategories class. + if (false) + { + var sb = new StringBuilder(); + sb.AppendLine("private static Dictionary _categories = new Dictionary() {"); + foreach(var category in results.Data!.CategoryTree) + { + sb.AppendLine($@" {{{category.Id}, new Category {{ Id = {category.Id}, ParentId = {category.ParentId}, Name = ""{category.Name.Replace("\"", "\\\"")}"" }} }},"); + } + sb.AppendLine("};"); + var hashTable = sb.ToString(); + Console.WriteLine(hashTable); + } +#pragma warning restore CS0162 // Unreachable code detected + + return new ApiResponse(results, nameof(TmeApi)); + } + } + + private FormUrlEncodedContent BuildApiParams(Uri uri, string country, string language, Dictionary parameters) + { + if (string.IsNullOrWhiteSpace(_configuration.ApiKey)) + throw new ArgumentException("ApiKey is empty!"); + if (string.IsNullOrWhiteSpace(_configuration.ApplicationSecret)) + throw new ArgumentException("ApplicationSecret is empty!"); + if (string.IsNullOrWhiteSpace(country)) + country = "US"; + if (string.IsNullOrWhiteSpace(language)) + language = "EN"; + + var apiParams = new Dictionary(); + // 2 letter country + apiParams.Add("Country", country.ToUpper()); + // 2 letter language identifier + apiParams.Add("Language", language.ToUpper()); + + foreach (var kvp in parameters) + apiParams.Add(kvp.Key, kvp.Value); + + // anonymous key or private token + // 3d3ed7d1003dd4a2c512a8c7c6f719b6a92b5025160f4f0318 + apiParams.Add("Token", _configuration.ApiKey); + + + // Encode and normalize params + // values must be sorted by key ASC, or the remote API will fail to match the signature + var urlEncodedContent = new FormUrlEncodedContent(apiParams.OrderBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value.ToString())); + var encodedParams = urlEncodedContent.ReadAsStringAsync().Result; + + // Calculate signature basis according the documentation + var url = uri.ToString(); + var escapedUri = UrlEncode(url); + var escapedParams = UrlEncode(encodedParams); + var signatureBase = $"POST&{escapedUri}&{escapedParams}"; + + // Calculate HMAC-SHA1 from signature and encode by Base64 function + var hmacSha1 = HashHmac(signatureBase, _configuration.ApplicationSecret); + var apiSignature = Convert.ToBase64String(hmacSha1); + + // Add ApiSignature to params + apiParams.Add("ApiSignature", apiSignature); + return new FormUrlEncodedContent(apiParams.OrderBy(x => x.Key).ToDictionary(x => x.Key, x => x.Value.ToString())); + } + + private bool TryHandleResponse(HttpResponseMessage response, out IApiResponse apiResponse) + { + apiResponse = apiResponse = ApiResponse.Create($"Api returned error status code {response.StatusCode}: {response.ReasonPhrase}", nameof(TmeApi)); + if (response.StatusCode == System.Net.HttpStatusCode.Unauthorized) + throw new ArrowUnauthorizedException(response?.ReasonPhrase ?? string.Empty); + else if (response.StatusCode == System.Net.HttpStatusCode.ServiceUnavailable) + { + if (response.Headers.Contains("X-RateLimit-Limit")) + { + // throttled + var remainingTime = TimeSpan.Zero; + if (response.Headers.Contains("X-RateLimit-Remaining")) + remainingTime = TimeSpan.FromSeconds(int.Parse(response.Headers.GetValues("X-RateLimit-Remaining").First())); + apiResponse = ApiResponse.Create($"{nameof(TmeApi)} request throttled. Try again in {remainingTime}", nameof(TmeApi)); + return true; + } + + // return generic error + return true; + } + else if (response.IsSuccessStatusCode) + { + // allow processing of response + return false; + } + + var resultString = response.Content.ReadAsStringAsync().Result; + // return generic error + return true; + } + + private HttpRequestMessage CreateRequest(HttpMethod method, Uri uri, FormUrlEncodedContent content) + { + var message = new HttpRequestMessage(method, uri); + message.Content = content; + message.Headers.Add("Accept", "application/json"); + return message; + } + + private byte[] HashHmac(string input, string key) + { + var hmac = new HMACSHA1(Encoding.ASCII.GetBytes(key)); + byte[] byteArray = Encoding.ASCII.GetBytes(input); + return hmac.ComputeHash(byteArray); + } + + private string UrlEncode(string s) + { + // This function uses uppercase in escaped chars to be compatible with the documentation + + // Input: https://api.tme.eu/Products/GetParameters.json + // https%3a%2f%2fapi.tme.eu%2fProducts%2fGetParameters.json - HttpUtility.UrlEncode + // https%3A%2F%2Fapi.tme.eu%2FProducts%2FGetParameters.json - result + // %3a => %3A ... + + var temp = System.Web.HttpUtility.UrlEncode(s).ToCharArray(); + for (var i = 0; i < temp.Length - 2; i++) + { + if (temp[i] == '%') + { + temp[i + 1] = char.ToUpper(temp[i + 1]); + temp[i + 2] = char.ToUpper(temp[i + 2]); + } + } + return new string(temp); + } + } +} diff --git a/Binner/Library/Binner.Common/MappingProfiles/SettingsRequestProfile.cs b/Binner/Library/Binner.Common/MappingProfiles/SettingsRequestProfile.cs index af520c00..95b274e1 100644 --- a/Binner/Library/Binner.Common/MappingProfiles/SettingsRequestProfile.cs +++ b/Binner/Library/Binner.Common/MappingProfiles/SettingsRequestProfile.cs @@ -17,6 +17,7 @@ public SettingsRequestProfile() .ForMember(x => x.Mouser, options => options.MapFrom(x => x.Integrations.Mouser)) .ForMember(x => x.Arrow, options => options.MapFrom(x => x.Integrations.Arrow)) .ForMember(x => x.Octopart, options => options.MapFrom(x => x.Integrations.Nexar)) + .ForMember(x => x.Tme, options => options.MapFrom(x => x.Integrations.Tme)) .ForMember(x => x.Printer, options => options.MapFrom(x => x.PrinterConfiguration)) .ForMember(x => x.Barcode, options => options.MapFrom(x => x.Barcode)) .ForMember(x => x.Language, options => options.MapFrom(x => x.Language)) @@ -49,6 +50,12 @@ public SettingsRequestProfile() .ForMember(x => x.NexarEnabled, options => options.MapFrom(x => x.Octopart.Enabled)) .ForMember(x => x.NexarClientId, options => options.MapFrom(x => x.Octopart.ClientId)) .ForMember(x => x.NexarClientSecret, options => options.MapFrom(x => x.Octopart.ClientSecret)) + .ForMember(x => x.TmeEnabled, options => options.MapFrom(x => x.Tme.Enabled)) + .ForMember(x => x.TmeCountry, options => options.MapFrom(x => x.Tme.Country)) + .ForMember(x => x.TmeApplicationSecret, options => options.MapFrom(x => x.Tme.ApplicationSecret)) + .ForMember(x => x.TmeApiKey, options => options.MapFrom(x => x.Tme.ApiKey)) + .ForMember(x => x.TmeApiUrl, options => options.MapFrom(x => x.Tme.ApiUrl)) + .ForMember(x => x.UserId, options => options.Ignore()) .ForMember(x => x.DateCreatedUtc, options => options.Ignore()) .ForMember(x => x.DateModifiedUtc, options => options.Ignore()); diff --git a/Binner/Library/Binner.Common/MappingProfiles/SettingsResponseProfile.cs b/Binner/Library/Binner.Common/MappingProfiles/SettingsResponseProfile.cs index 0f86964b..a41bf20c 100644 --- a/Binner/Library/Binner.Common/MappingProfiles/SettingsResponseProfile.cs +++ b/Binner/Library/Binner.Common/MappingProfiles/SettingsResponseProfile.cs @@ -18,6 +18,7 @@ public SettingsResponseProfile() .ForMember(x => x.Mouser, options => options.MapFrom(x => x.Integrations.Mouser)) .ForMember(x => x.Arrow, options => options.MapFrom(x => x.Integrations.Arrow)) .ForMember(x => x.Octopart, options => options.MapFrom(x => x.Integrations.Nexar)) + .ForMember(x => x.Tme, options => options.MapFrom(x => x.Integrations.Tme)) .ForMember(x => x.Printer, options => options.MapFrom(x => x.PrinterConfiguration)) .ForMember(x => x.Barcode, options => options.MapFrom(x => x.Barcode)) .ForMember(x => x.Language, options => options.MapFrom(x => x.Language)) @@ -66,6 +67,14 @@ public SettingsResponseProfile() ClientId = x.NexarClientId, ClientSecret = x.NexarClientSecret })) + .ForMember(x => x.Tme, options => options.MapFrom(x => new TmeUserConfiguration + { + Enabled = x.TmeEnabled, + Country = x.TmeCountry, + ApplicationSecret = x.TmeApplicationSecret, + ApiUrl = x.TmeApiUrl, + ApiKey = x.TmeApiKey + })) .ForMember(x => x.Printer, options => options.Ignore()) .ForMember(x => x.Barcode, options => options.Ignore()) .ForMember(x => x.Language, options => options.Ignore()) @@ -163,7 +172,13 @@ public SettingsResponseProfile() .ForMember(x => x.ClientId, options => options.MapFrom(x => x.ClientId)) .ForMember(x => x.ClientSecret, options => options.MapFrom(x => x.ClientSecret)) .ReverseMap(); - + CreateMap() + .ForMember(x => x.Enabled, options => options.MapFrom(x => x.Enabled)) + .ForMember(x => x.Country, options => options.MapFrom(x => x.Country)) + .ForMember(x => x.ApplicationSecret, options => options.MapFrom(x => x.ApplicationSecret)) + .ForMember(x => x.ApiKey, options => options.MapFrom(x => x.ApiKey)) + .ForMember(x => x.ApiUrl, options => options.MapFrom(x => x.ApiUrl)) + .ReverseMap(); CreateMap() .ForMember(x => x.Enabled, options => options.MapFrom(x => x.SwarmEnabled)) .ForMember(x => x.ApiKey, options => options.MapFrom(x => x.SwarmApiKey)) @@ -200,6 +215,14 @@ public SettingsResponseProfile() .ForMember(x => x.ClientId, options => options.MapFrom(x => x.NexarClientId)) .ForMember(x => x.ClientSecret, options => options.MapFrom(x => x.NexarClientSecret)) .ReverseMap(); + + CreateMap() + .ForMember(x => x.Enabled, options => options.MapFrom(x => x.TmeEnabled)) + .ForMember(x => x.Country, options => options.MapFrom(x => x.TmeCountry)) + .ForMember(x => x.ApplicationSecret, options => options.MapFrom(x => x.TmeApplicationSecret)) + .ForMember(x => x.ApiKey, options => options.MapFrom(x => x.TmeApiKey)) + .ForMember(x => x.ApiUrl, options => options.MapFrom(x => x.TmeApiUrl)) + .ReverseMap(); } } } diff --git a/Binner/Library/Binner.Common/Services/IntegrationApiFactory.cs b/Binner/Library/Binner.Common/Services/IntegrationApiFactory.cs index 61992900..43aa70fd 100644 --- a/Binner/Library/Binner.Common/Services/IntegrationApiFactory.cs +++ b/Binner/Library/Binner.Common/Services/IntegrationApiFactory.cs @@ -75,6 +75,13 @@ public T CreateGlobal() if (resultTyped != null) return resultTyped; } + if (apiType == typeof(TmeApi)) + { + var result = CreateGlobalTmeApi(); + var resultTyped = result as T; + if (resultTyped != null) + return resultTyped; + } throw new NotImplementedException($"Unhandled type '{apiType.Name}'"); } @@ -127,6 +134,11 @@ public async Task CreateAsync(int userId) NexarEnabled = _webHostServiceConfiguration.Integrations.Nexar.Enabled, NexarClientId = _webHostServiceConfiguration.Integrations.Nexar.ClientId, NexarClientSecret = _webHostServiceConfiguration.Integrations.Nexar.ClientSecret, + + TmeEnabled = _webHostServiceConfiguration.Integrations.Tme.Enabled, + TmeApplicationSecret = _webHostServiceConfiguration.Integrations.Tme.ApplicationSecret, + TmeApiKey = _webHostServiceConfiguration.Integrations.Tme.ApiKey, + TmeApiUrl = _webHostServiceConfiguration.Integrations.Tme.ApiUrl, }; // build the credentials list @@ -180,6 +192,16 @@ public async Task CreateAsync(int userId) }; credentials.Add(new ApiCredential(userId, nexarConfiguration, nameof(NexarApi))); + var tmeConfiguration = new Dictionary + { + { "Enabled", userIntegrationConfiguration.TmeEnabled }, + { "Country", userIntegrationConfiguration.TmeCountry }, + { "ApplicationSecret", userIntegrationConfiguration.TmeApplicationSecret ?? string.Empty }, + { "ApiKey", userIntegrationConfiguration.TmeApiKey ?? string.Empty }, + { "ApiUrl", userIntegrationConfiguration.TmeApiUrl }, + }; + credentials.Add(new ApiCredential(userId, tmeConfiguration, nameof(TmeApi))); + return new ApiCredentialConfiguration(userId, credentials); }; return await CreateAsync(userId, getCredentialsMethod, true); @@ -234,6 +256,13 @@ public async Task CreateAsync(int userId, Func CreateArrowApiAsync(ApiCredentialKey credentialKey, var api = new ArrowApi(configuration, _httpContextAccessor); return api; } + + private TmeApi CreateGlobalTmeApi() + { + var configuration = new TmeConfiguration + { + // system settings + Enabled = _integrationConfiguration.Tme.Enabled, + Country = _integrationConfiguration.Tme.Country, + ApplicationSecret = _integrationConfiguration.Tme.ApplicationSecret, + ApiKey = _integrationConfiguration.Tme.ApiKey, + ApiUrl = _integrationConfiguration.Tme.ApiUrl, + }; + var api = new TmeApi(configuration, _webHostServiceConfiguration.Locale, _httpContextAccessor); + return api; + } + + private async Task CreateTmeApiAsync(ApiCredentialKey credentialKey, Func> getCredentialsMethod, bool cache) + { + ApiCredential? credentials = null; + if (cache) + credentials = await _credentialProvider.Cache.GetOrAddCredentialAsync(credentialKey, nameof(TmeApi), getCredentialsMethod); + else + credentials = await _credentialProvider.Cache.FetchCredentialAsync(credentialKey, nameof(TmeApi), getCredentialsMethod); + var configuration = new TmeConfiguration + { + Enabled = credentials.GetCredentialBool("Enabled"), + Country = credentials.GetCredentialString("Country"), + ApplicationSecret = credentials.GetCredentialString("ApplicationSecret"), + ApiKey = credentials.GetCredentialString("ApiKey"), + ApiUrl = credentials.GetCredentialString("ApiUrl"), + }; + var api = new TmeApi(configuration, _webHostServiceConfiguration.Locale, _httpContextAccessor); + return api; + } } } diff --git a/Binner/Library/Binner.Common/Services/IntegrationService.cs b/Binner/Library/Binner.Common/Services/IntegrationService.cs index aaffff1a..7268beef 100644 --- a/Binner/Library/Binner.Common/Services/IntegrationService.cs +++ b/Binner/Library/Binner.Common/Services/IntegrationService.cs @@ -1,12 +1,12 @@ using Binner.Common.Integrations; using Binner.Global.Common; +using Binner.Model.Configuration.Integrations; using Binner.Model.Requests; using Binner.Model.Responses; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Binner.Model.Configuration.Integrations; namespace Binner.Common.Services { @@ -93,6 +93,16 @@ public async Task TestApiAsync(TestApiRequest request) }; credentials.Add(new ApiCredential(user?.UserId ?? 0, octopartConfiguration, nameof(NexarApi))); + var tmeConfiguration = new Dictionary + { + { "Enabled", request.Configuration.Where(x => x.Key.Equals("Enabled", comparisonType) && x.Value != null).Select(x => bool.Parse(x.Value ?? "false")).FirstOrDefault() }, + { "Country", request.Configuration.Where(x => x.Key.Equals("Country", comparisonType) && x.Value != null).Select(x => x.Value).FirstOrDefault() ?? string.Empty }, + { "ApplicationSecret", request.Configuration.Where(x => x.Key.Equals("ApplicationSecret", comparisonType) && x.Value != null).Select(x => x.Value).FirstOrDefault() ?? string.Empty }, + { "ApiKey", request.Configuration.Where(x => x.Key.Equals("ApiKey", comparisonType) && x.Value != null).Select(x =>x.Value).FirstOrDefault() ?? string.Empty }, + { "ApiUrl", request.Configuration.Where(x => x.Key.Equals("ApiUrl", comparisonType) && x.Value != null).Select(x => WrapUrl(x.Value)).FirstOrDefault() ?? string.Empty }, + }; + credentials.Add(new ApiCredential(user?.UserId ?? 0, tmeConfiguration, nameof(TmeApi))); + return new ApiCredentialConfiguration(user?.UserId ?? 0, credentials); }; @@ -172,22 +182,22 @@ public async Task TestApiAsync(TestApiRequest request) } } case "arrow": - { - var api = await _integrationApiFactory.CreateAsync(user?.UserId ?? 0, getCredentialsMethod, false); - if (!api.IsEnabled) - return new TestApiResponse(nameof(Integrations.ArrowApi), "Api is not enabled."); - try - { - var result = await api.SearchAsync("LM555", 1); - if (result.Errors.Any()) - return new TestApiResponse(nameof(Integrations.ArrowApi), string.Join(". ", result.Errors)); - return new TestApiResponse(nameof(Integrations.ArrowApi), true); - } - catch (Exception ex) { - return new TestApiResponse(nameof(Integrations.ArrowApi), ex.GetBaseException().Message); + var api = await _integrationApiFactory.CreateAsync(user?.UserId ?? 0, getCredentialsMethod, false); + if (!api.IsEnabled) + return new TestApiResponse(nameof(Integrations.ArrowApi), "Api is not enabled."); + try + { + var result = await api.SearchAsync("LM555", 1); + if (result.Errors.Any()) + return new TestApiResponse(nameof(Integrations.ArrowApi), string.Join(". ", result.Errors)); + return new TestApiResponse(nameof(Integrations.ArrowApi), true); + } + catch (Exception ex) + { + return new TestApiResponse(nameof(Integrations.ArrowApi), ex.GetBaseException().Message); + } } - } case "nexar": case "octopart": { @@ -206,6 +216,24 @@ public async Task TestApiAsync(TestApiRequest request) return new TestApiResponse(nameof(Integrations.NexarApi), ex.GetBaseException().Message); } } + case "tme": + { + var api = await _integrationApiFactory.CreateAsync(user?.UserId ?? 0, getCredentialsMethod, false); + if (!api.IsEnabled) + return new TestApiResponse(nameof(Integrations.TmeApi), "Api is not enabled."); + try + { + //var categories = await api.GetCategoriesAsync(); + var result = await api.SearchAsync("LM555", 1); + if (result.Errors.Any()) + return new TestApiResponse(nameof(Integrations.TmeApi), string.Join(". ", result.Errors)); + return new TestApiResponse(nameof(Integrations.TmeApi), true); + } + catch (Exception ex) + { + return new TestApiResponse(nameof(Integrations.TmeApi), ex.GetBaseException().Message); + } + } } return new TestApiResponse(request.Name, $"Unknown api name!"); diff --git a/Binner/Library/Binner.Common/Services/PartService.cs b/Binner/Library/Binner.Common/Services/PartService.cs index 06a9699d..b59618bf 100644 --- a/Binner/Library/Binner.Common/Services/PartService.cs +++ b/Binner/Library/Binner.Common/Services/PartService.cs @@ -797,6 +797,7 @@ private CommonPart MouserOrderLineToCommonPart(OrderHistoryLine? orderLine, stri var mouserApi = await _integrationApiFactory.CreateAsync(user?.UserId ?? 0); var nexarApi = await _integrationApiFactory.CreateAsync(user?.UserId ?? 0); var arrowApi = await _integrationApiFactory.CreateAsync(user?.UserId ?? 0); + var tmeApi = await _integrationApiFactory.CreateAsync(user?.UserId ?? 0); if (partNumber.StartsWith("[)>")) { if (digikeyApi.Configuration.IsConfigured) @@ -829,6 +830,7 @@ private CommonPart MouserOrderLineToCommonPart(OrderHistoryLine? orderLine, stri var mouserResponse = new SearchResultsResponse(); var arrowResponse = new ArrowResponse(); var nexarResponse = new NexarPartResults(); + var tmeResponse = new Model.Integrations.Tme.TmeResponse(); var searchKeywords = partNumber; if (digikeyApi.Configuration.IsConfigured) @@ -1065,6 +1067,33 @@ private CommonPart MouserOrderLineToCommonPart(OrderHistoryLine? orderLine, stri apiResponses[nameof(ArrowApi)].IsSuccess = arrowResponse?.ItemServiceResult?.Data?.Any() == true; } + if (tmeApi.Configuration.IsConfigured) + { + IApiResponse? apiResponse = null; + try + { + apiResponse = await tmeApi.SearchAsync(searchKeywords, partType, mountingType); + } + catch (Exception ex) + { + _logger.LogError(ex, $"[{nameof(TmeApi)}]: {ex.GetBaseException().Message}"); + apiResponse = new ApiResponse(new List { ex.GetBaseException().Message }, nameof(TmeApi)); + } + apiResponses.Add(nameof(TmeApi), new Model.Integrations.ApiResponseState(false, apiResponse)); + if (apiResponse.Warnings?.Any() == true) + { + _logger.LogWarning($"[{apiResponse.ApiName}]: {string.Join(". ", apiResponse.Warnings)}"); + } + if (apiResponse.Errors?.Any() == true) + { + _logger.LogError($"[{apiResponse.ApiName}]: {string.Join(". ", apiResponse.Errors)}"); + //return ServiceResult.Create(apiResponse.Errors, apiResponse.ApiName); + } + + tmeResponse = (Model.Integrations.Tme.TmeResponse?)apiResponse.Response; + apiResponses[nameof(TmeApi)].IsSuccess = tmeResponse?.Data?.ProductList?.Any() == true; + } + if (!apiResponses.Any(x => x.Value.IsSuccess)) { if (apiResponses.Any(x => x.Value.Response?.Errors.Any() == true)) diff --git a/Binner/Library/Binner.Model/Configuration/IntegrationConfiguration.cs b/Binner/Library/Binner.Model/Configuration/IntegrationConfiguration.cs index 109f59f1..ff53f4f1 100644 --- a/Binner/Library/Binner.Model/Configuration/IntegrationConfiguration.cs +++ b/Binner/Library/Binner.Model/Configuration/IntegrationConfiguration.cs @@ -29,6 +29,11 @@ public class IntegrationConfiguration /// public ArrowConfiguration Arrow { get; set; } = new (); + /// + /// Tme config + /// + public TmeConfiguration Tme { get; set; } = new(); + /// /// AliExpress config /// diff --git a/Binner/Library/Binner.Model/Configuration/Integrations/TmeConfiguration.cs b/Binner/Library/Binner.Model/Configuration/Integrations/TmeConfiguration.cs new file mode 100644 index 00000000..c836eaa9 --- /dev/null +++ b/Binner/Library/Binner.Model/Configuration/Integrations/TmeConfiguration.cs @@ -0,0 +1,29 @@ +namespace Binner.Model.Configuration.Integrations +{ + /// + /// TME api configuration + /// + public class TmeConfiguration : IApiConfiguration + { + public bool Enabled { get; set; } = false; + + public string Country { get; set; } = "us"; + + /// + /// Api key (anonymous key) + /// + public string? ApiKey { get; set; } + + /// + /// Application secret + /// + public string? ApplicationSecret { get; set; } + + /// + /// Path to the api + /// + public string ApiUrl { get; set; } = "https://api.tme.eu"; + + public bool IsConfigured => Enabled && !string.IsNullOrEmpty(ApiKey) && !string.IsNullOrEmpty(ApiUrl) && !string.IsNullOrEmpty(ApplicationSecret); + } +} diff --git a/Binner/Library/Binner.Model/Configuration/Integrations/TmeUserConfiguration.cs b/Binner/Library/Binner.Model/Configuration/Integrations/TmeUserConfiguration.cs new file mode 100644 index 00000000..a7fd0b88 --- /dev/null +++ b/Binner/Library/Binner.Model/Configuration/Integrations/TmeUserConfiguration.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Binner.Model.Configuration.Integrations +{ + /// + /// TME Api user configuration settings + /// + public class TmeUserConfiguration + { + public bool Enabled { get; set; } = true; + + /// + /// Country + /// + public string? Country { get; set; } = "us"; + + /// + /// Api key + /// + public string? ApiKey { get; set; } + + /// + /// Your TME application secret + /// + public string? ApplicationSecret { get; set; } + + /// + /// Path to the api + /// + public string ApiUrl { get; set; } = "https://api.tme.eu"; + + public bool IsConfigured => Enabled && !string.IsNullOrEmpty(ApiKey) && !string.IsNullOrEmpty(ApiUrl) && !string.IsNullOrEmpty(ApplicationSecret); + } +} diff --git a/Binner/Library/Binner.Model/Configuration/Integrations/UserIntegrationConfiguration.cs b/Binner/Library/Binner.Model/Configuration/Integrations/UserIntegrationConfiguration.cs index 8ee97e0c..5bca9d71 100644 --- a/Binner/Library/Binner.Model/Configuration/Integrations/UserIntegrationConfiguration.cs +++ b/Binner/Library/Binner.Model/Configuration/Integrations/UserIntegrationConfiguration.cs @@ -125,6 +125,31 @@ public class UserIntegrationConfiguration /// public string? NexarClientSecret { get; set; } + /// + /// TME api enabled + /// + public bool TmeEnabled { get; set; } = true; + + /// + /// TME api Country + /// + public string TmeCountry { get; set; } = "us"; + + /// + /// The user's TME application secret + /// + public string? TmeApplicationSecret { get; set; } + + /// + /// The Api key + /// + public string? TmeApiKey { get; set; } + + /// + /// TME api url + /// + public string TmeApiUrl { get; set; } = "https://api.tme.eu/"; + /// /// Creation date /// diff --git a/Binner/Library/Binner.Model/Configuration/LocaleConfiguration.cs b/Binner/Library/Binner.Model/Configuration/LocaleConfiguration.cs index a6810836..1088d9d4 100644 --- a/Binner/Library/Binner.Model/Configuration/LocaleConfiguration.cs +++ b/Binner/Library/Binner.Model/Configuration/LocaleConfiguration.cs @@ -4,7 +4,7 @@ public class LocaleConfiguration { /// /// Default language to be used by the API. - /// Valid values: en, br, cs, da, de, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht + /// Valid values: en, br, cs, da, de, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht, bg, rm, el, hr, lt, lv, ru, sk, tr, uk /// public Languages Language { get; set; } = Languages.En; diff --git a/Binner/Library/Binner.Model/Integrations/Tme/Category.cs b/Binner/Library/Binner.Model/Integrations/Tme/Category.cs new file mode 100644 index 00000000..9b441ac6 --- /dev/null +++ b/Binner/Library/Binner.Model/Integrations/Tme/Category.cs @@ -0,0 +1,13 @@ +namespace Binner.Model.Integrations.Tme +{ + public class Category + { + public int Id { get; set; } + public int? ParentId { get; set; } + public int Depth { get; set; } + public string? Name { get; set; } + public int TotalProducts { get; set; } + public int SubTreeCount { get; set; } + public string? Thumbnail { get; set; } + } +} diff --git a/Binner/Library/Binner.Model/Integrations/Tme/CategoryResponse.cs b/Binner/Library/Binner.Model/Integrations/Tme/CategoryResponse.cs new file mode 100644 index 00000000..5e4c9511 --- /dev/null +++ b/Binner/Library/Binner.Model/Integrations/Tme/CategoryResponse.cs @@ -0,0 +1,7 @@ +namespace Binner.Model.Integrations.Tme +{ + public class CategoryResponse + { + public List CategoryTree { get; set; } = new(); + } +} diff --git a/Binner/Library/Binner.Model/Integrations/Tme/CategoryTree.cs b/Binner/Library/Binner.Model/Integrations/Tme/CategoryTree.cs new file mode 100644 index 00000000..ada7d8ab --- /dev/null +++ b/Binner/Library/Binner.Model/Integrations/Tme/CategoryTree.cs @@ -0,0 +1,14 @@ +namespace Binner.Model.Integrations.Tme +{ + public class CategoryTree + { + public int TotalProducts { get; set; } + public int Id { get; set; } + public int? ParentId { get; set; } + public int Depth { get; set; } + public string? Name { get; set; } + public string? Thumbnail { get; set; } + public int SubTreeCount { get; set; } + public List? SubTree { get; set; } = new (); + } +} diff --git a/Binner/Library/Binner.Model/Integrations/Tme/CategoryTreeResponse.cs b/Binner/Library/Binner.Model/Integrations/Tme/CategoryTreeResponse.cs new file mode 100644 index 00000000..0485de7b --- /dev/null +++ b/Binner/Library/Binner.Model/Integrations/Tme/CategoryTreeResponse.cs @@ -0,0 +1,7 @@ +namespace Binner.Model.Integrations.Tme +{ + public class CategoryTreeResponse + { + public CategoryTreeResponse CategoryTree { get; set; } = new(); + } +} diff --git a/Binner/Library/Binner.Model/Integrations/Tme/ProductSearchResponse.cs b/Binner/Library/Binner.Model/Integrations/Tme/ProductSearchResponse.cs new file mode 100644 index 00000000..dd735419 --- /dev/null +++ b/Binner/Library/Binner.Model/Integrations/Tme/ProductSearchResponse.cs @@ -0,0 +1,117 @@ +namespace Binner.Model.Integrations.Tme +{ + /// + /// TME Product search response + /// + public class ProductSearchResponse + { + /// + /// Array of product objects. + /// + public List ProductList { get; set; } = new(); + + /// + /// Total amount of found products (pagination). PageSize is 20 rows and cannot be specified. + /// + public int Amount { get; set; } + + /// + /// Actual results page number (current page number) + /// + public int PageNumber { get; set; } + + /// + /// List of categories in products category tree. + /// + public Dictionary CategoryList { get; set; } = new(); + } + + public class Product + { + /// + /// Unique product identifier + /// + public string? Symbol { get; set; } + /// + /// Producers product identifier + /// + public string? OriginalSymbol { get; set; } + /// + /// Manufacturer name + /// + public string? Producer { get; set; } + /// + /// Product description + /// + public string? Description { get; set; } + /// + /// Leaf category id in which the product is located + /// + public int CategoryId { get; set; } + /// + /// Leaf category name in which the product is located + /// + public string? Category { get; set; } + /// + /// URL address of product image (640x480px). + /// + public string? Photo { get; set; } // without http: + /// + /// URL address of products thumbnail image (100x75px) + /// + public string? Thumbnail { get; set; } // without http: + /// + /// Gross weight of 1 pcs of a product + /// + public double Weight { get; set; } + /// + /// Number of products supplied in one package. + /// + public int SuppliedAmount { get; set; } + /// + /// - The minimum amount of product that can be ordered. + /// + public int MinAmount { get; set; } + /// + /// - Product multiplicity. Product Quantity must be a multiple of this value + /// + public int Multiples { get; set; } + /// + /// List of product statuses + /// + public List ProductStatusList { get; set; } = new(); + /// + /// Symbol of unit used to describe amount of product e.g. "pcs" (pieces). + /// + public string? Unit { get; set; } + /// + /// ID of available offer + /// + public int? OfferId { get; set; } + /// + /// CustomerSymbol or empty string. + /// + public string? CustomerSymbol { get; set; } + /// + /// Product information URL address. + /// + public string? ProductInformationPage { get; set; } // without http: + /// + /// Information about product's guarantee. Can be null when there is no guarantee for this product + /// + public Guarantee? Guarantee { get; set; } + } + + public class Guarantee + { + /// + /// Guarantee type - can be "period" or "lifetime" + /// + public string? Type { get; set; } // lifetime + + /// + /// Guarantee period in months. This field may be equal "0" in case of lifetime guarantee + /// + public int Period { get; set; } + } +} diff --git a/Binner/Library/Binner.Model/Integrations/Tme/SearchDirection.cs b/Binner/Library/Binner.Model/Integrations/Tme/SearchDirection.cs new file mode 100644 index 00000000..c790af72 --- /dev/null +++ b/Binner/Library/Binner.Model/Integrations/Tme/SearchDirection.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Binner.Model.Integrations.Tme +{ + public enum SearchDirection + { + ASC, + DESC + } +} diff --git a/Binner/Library/Binner.Model/Integrations/Tme/SearchOrder.cs b/Binner/Library/Binner.Model/Integrations/Tme/SearchOrder.cs new file mode 100644 index 00000000..07a2b934 --- /dev/null +++ b/Binner/Library/Binner.Model/Integrations/Tme/SearchOrder.cs @@ -0,0 +1,14 @@ +namespace Binner.Model.Integrations.Tme +{ + /// + /// TME Search Order + /// + public enum SearchOrder + { + ACCURACY, + SYMBOL, + ORIGINAL_SYMBOL, + PRICE_FIRST_QUANTITY, + PRICE_LAST_QUANTITY + } +} diff --git a/Binner/Library/Binner.Model/Integrations/Tme/StaticCategories.cs b/Binner/Library/Binner.Model/Integrations/Tme/StaticCategories.cs new file mode 100644 index 00000000..602f7ac9 --- /dev/null +++ b/Binner/Library/Binner.Model/Integrations/Tme/StaticCategories.cs @@ -0,0 +1,1640 @@ +namespace Binner.Model.Integrations.Tme +{ + public static class StaticCategories + { + private static Dictionary _categories = new Dictionary() { + {111000, new Category { Id = 111000, ParentId = 111000, Name = "" } }, + {112140, new Category { Id = 112140, ParentId = 111000, Name = "Semiconductors" } }, + {112141, new Category { Id = 112141, ParentId = 112140, Name = "Diodes" } }, + {100179, new Category { Id = 100179, ParentId = 112141, Name = "Universal diodes" } }, + {112791, new Category { Id = 112791, ParentId = 100179, Name = "SMD universal diodes" } }, + {113119, new Category { Id = 113119, ParentId = 100179, Name = "THT universal diodes" } }, + {112792, new Category { Id = 112792, ParentId = 100179, Name = "Stud mounting universal diodes" } }, + {112793, new Category { Id = 112793, ParentId = 100179, Name = "Diodes - others" } }, + {112795, new Category { Id = 112795, ParentId = 112141, Name = "Schottky diodes" } }, + {112796, new Category { Id = 112796, ParentId = 112795, Name = "SMD Schottky diodes" } }, + {112797, new Category { Id = 112797, ParentId = 112795, Name = "THT Schottky diodes" } }, + {112798, new Category { Id = 112798, ParentId = 112795, Name = "Stud mounting Schottky diodes" } }, + {100257, new Category { Id = 100257, ParentId = 112141, Name = "Zener diodes" } }, + {100576, new Category { Id = 100576, ParentId = 100257, Name = "SMD Zener diodes" } }, + {100254, new Category { Id = 100254, ParentId = 100257, Name = "THT Zener diodes" } }, + {112799, new Category { Id = 112799, ParentId = 100257, Name = "Stud mounting Zener diodes" } }, + {100253, new Category { Id = 100253, ParentId = 112141, Name = "Transil diodes" } }, + {112800, new Category { Id = 112800, ParentId = 100253, Name = "SMD transil diodes" } }, + {112801, new Category { Id = 112801, ParentId = 112800, Name = "Unidirectional SMD transil diodes" } }, + {112802, new Category { Id = 112802, ParentId = 112800, Name = "Bidirectional SMD transil diodes" } }, + {112803, new Category { Id = 112803, ParentId = 100253, Name = "THT transil diodes" } }, + {112804, new Category { Id = 112804, ParentId = 112803, Name = "Unidirectional THT transil diodes" } }, + {112805, new Category { Id = 112805, ParentId = 112803, Name = "Bidirectional THT transil diodes" } }, + {113178, new Category { Id = 113178, ParentId = 100253, Name = "Transil diodes - arrays" } }, + {112806, new Category { Id = 112806, ParentId = 112141, Name = "Special diodes" } }, + {113441, new Category { Id = 113441, ParentId = 113440, Name = "Diode modules" } }, + {112807, new Category { Id = 112807, ParentId = 112140, Name = "Bridge rectifiers" } }, + {112808, new Category { Id = 112808, ParentId = 112807, Name = "Single phase bridge rectifiers" } }, + {100287, new Category { Id = 100287, ParentId = 112808, Name = "Single phase diode bridge rectifiers" } }, + {112809, new Category { Id = 112809, ParentId = 100287, Name = "SMD/THT sing. phase diode bridge rectif." } }, + {112810, new Category { Id = 112810, ParentId = 100287, Name = "Round single phase diode bridge rectif." } }, + {112811, new Category { Id = 112811, ParentId = 100287, Name = "Flat single phase diode bridge rectif." } }, + {112812, new Category { Id = 112812, ParentId = 100287, Name = "Square single phase diode bridge rectif." } }, + {112813, new Category { Id = 112813, ParentId = 100287, Name = "Sing. ph. diode bridge rectif. - others" } }, + {112814, new Category { Id = 112814, ParentId = 112808, Name = "Single phase controlled bridge rectif." } }, + {112815, new Category { Id = 112815, ParentId = 112807, Name = "Three phase bridge rectifiers" } }, + {112816, new Category { Id = 112816, ParentId = 112815, Name = "Three phase diode bridge rectifiers" } }, + {112817, new Category { Id = 112817, ParentId = 112815, Name = "Three phase controlled bridge rectif." } }, + {113440, new Category { Id = 113440, ParentId = 112140, Name = "Discrete semiconductors modules" } }, + {113441, new Category { Id = 113441, ParentId = 113440, Name = "Diode modules" } }, + {112823, new Category { Id = 112823, ParentId = 112822, Name = "Thyristor modules" } }, + {112824, new Category { Id = 112824, ParentId = 112822, Name = "Diode - thyristor modules" } }, + {113458, new Category { Id = 113458, ParentId = 17, Name = "Transistor modules MOSFET" } }, + {100311, new Category { Id = 100311, ParentId = 112839, Name = "IGBT modules" } }, + {19, new Category { Id = 19, ParentId = 112140, Name = "Thyristors" } }, + {100181, new Category { Id = 100181, ParentId = 19, Name = "Single thyristores" } }, + {112818, new Category { Id = 112818, ParentId = 100181, Name = "SMD/THT thyristors" } }, + {112819, new Category { Id = 112819, ParentId = 100181, Name = "Stud mounting thyristors" } }, + {112820, new Category { Id = 112820, ParentId = 100181, Name = "Button thyristors" } }, + {112821, new Category { Id = 112821, ParentId = 100181, Name = "Thyristors - others" } }, + {112822, new Category { Id = 112822, ParentId = 19, Name = "Thyristor modules" } }, + {112823, new Category { Id = 112823, ParentId = 112822, Name = "Thyristor modules" } }, + {112824, new Category { Id = 112824, ParentId = 112822, Name = "Diode - thyristor modules" } }, + {100125, new Category { Id = 100125, ParentId = 112140, Name = "Triacs" } }, + {100182, new Category { Id = 100182, ParentId = 112140, Name = "Diacs" } }, + {112825, new Category { Id = 112825, ParentId = 112140, Name = "Transistors" } }, + {17, new Category { Id = 17, ParentId = 112825, Name = "Unipolar transistors" } }, + {100309, new Category { Id = 100309, ParentId = 17, Name = "N channel transistors" } }, + {112826, new Category { Id = 112826, ParentId = 100309, Name = "SMD N channel transistors" } }, + {112827, new Category { Id = 112827, ParentId = 100309, Name = "THT N channel transistors" } }, + {100592, new Category { Id = 100592, ParentId = 17, Name = "P channel transistors" } }, + {112828, new Category { Id = 112828, ParentId = 100592, Name = "SMD P channel transistors" } }, + {112829, new Category { Id = 112829, ParentId = 100592, Name = "THT P channel transistors" } }, + {100615, new Category { Id = 100615, ParentId = 17, Name = "Multi channel transistors" } }, + {113458, new Category { Id = 113458, ParentId = 17, Name = "Transistor modules MOSFET" } }, + {112830, new Category { Id = 112830, ParentId = 112825, Name = "Bipolar transistors" } }, + {112831, new Category { Id = 112831, ParentId = 112830, Name = "Single bipolar transistors" } }, + {112832, new Category { Id = 112832, ParentId = 112831, Name = "PNP SMD transistors" } }, + {100591, new Category { Id = 100591, ParentId = 112831, Name = "PNP THT transistors" } }, + {112833, new Category { Id = 112833, ParentId = 112831, Name = "NPN SMD transistors" } }, + {100180, new Category { Id = 100180, ParentId = 112831, Name = "NPN THT transistors" } }, + {113448, new Category { Id = 113448, ParentId = 112830, Name = "Complementary transistors" } }, + {112834, new Category { Id = 112834, ParentId = 112830, Name = "Darlington transistors" } }, + {112835, new Category { Id = 112835, ParentId = 112834, Name = "PNP SMD Darlington transistors" } }, + {112836, new Category { Id = 112836, ParentId = 112834, Name = "PNP THT Darlington transistors" } }, + {112837, new Category { Id = 112837, ParentId = 112834, Name = "NPN SMD Darlington transistors" } }, + {112838, new Category { Id = 112838, ParentId = 112834, Name = "NPN THT Darlington transistors" } }, + {112839, new Category { Id = 112839, ParentId = 112825, Name = "IGBT transistors and modules" } }, + {112840, new Category { Id = 112840, ParentId = 112839, Name = "IGBT transistors" } }, + {112841, new Category { Id = 112841, ParentId = 112840, Name = "SMD IGBT transistors" } }, + {112842, new Category { Id = 112842, ParentId = 112840, Name = "THT IGBT transistors" } }, + {100311, new Category { Id = 100311, ParentId = 112839, Name = "IGBT modules" } }, + {100594, new Category { Id = 100594, ParentId = 112825, Name = "Unijunction transistors" } }, + {100283, new Category { Id = 100283, ParentId = 112140, Name = "Integrated circuits" } }, + {100421, new Category { Id = 100421, ParentId = 100283, Name = "Analog and mixed integrated circuits" } }, + {100622, new Category { Id = 100622, ParentId = 100421, Name = "Digital potentiometers" } }, + {100223, new Category { Id = 100223, ParentId = 100421, Name = "Temperature transducers" } }, + {100216, new Category { Id = 100216, ParentId = 100421, Name = "Operational amplifiers" } }, + {112843, new Category { Id = 112843, ParentId = 100216, Name = "SMD operational amplifiers" } }, + {112844, new Category { Id = 112844, ParentId = 100216, Name = "THT operational amplifiers" } }, + {112845, new Category { Id = 112845, ParentId = 100421, Name = "Comparators" } }, + {100217, new Category { Id = 100217, ParentId = 112845, Name = "SMD comparators" } }, + {112846, new Category { Id = 112846, ParentId = 112845, Name = "THT comparators" } }, + {100579, new Category { Id = 100579, ParentId = 100421, Name = "U/I, U/f, U/U converters" } }, + {100221, new Category { Id = 100221, ParentId = 100421, Name = "Drivers - integrated circuits" } }, + {112847, new Category { Id = 112847, ParentId = 100421, Name = "Motor and PWM drivers" } }, + {112848, new Category { Id = 112848, ParentId = 100421, Name = "LED drivers" } }, + {112849, new Category { Id = 112849, ParentId = 100421, Name = "MOSFET/IGBT drivers" } }, + {100621, new Category { Id = 100621, ParentId = 100421, Name = "Filters - integrated circuits" } }, + {112850, new Category { Id = 112850, ParentId = 100421, Name = "Interfaces - integrated circuits" } }, + {112851, new Category { Id = 112851, ParentId = 112850, Name = "I2C interfaces - integrated circuits" } }, + {112852, new Category { Id = 112852, ParentId = 112850, Name = "USB interfaces - integrated circuits" } }, + {112853, new Category { Id = 112853, ParentId = 112850, Name = "CAN interfaces - integrated circuits" } }, + {112854, new Category { Id = 112854, ParentId = 112850, Name = "RS232/422/485 interfaces - integr. circ." } }, + {112855, new Category { Id = 112855, ParentId = 112850, Name = "ETHERNET interfaces -integrated circuits" } }, + {112856, new Category { Id = 112856, ParentId = 112850, Name = "Interfaces others - integrated circuits" } }, + {113433, new Category { Id = 113433, ParentId = 100421, Name = "Power switches - integrated circuits" } }, + {112877, new Category { Id = 112877, ParentId = 100284, Name = "A/D converters - integrated circuits" } }, + {112878, new Category { Id = 112878, ParentId = 100284, Name = "D/A converters - integrated circuits" } }, + {112857, new Category { Id = 112857, ParentId = 100283, Name = "Logic integrated circuits" } }, + {113421, new Category { Id = 113421, ParentId = 112857, Name = "Buffers, transceivers, drivers" } }, + {113422, new Category { Id = 113422, ParentId = 112857, Name = "Comparators" } }, + {113423, new Category { Id = 113423, ParentId = 112857, Name = "Counters/dividers" } }, + {113424, new Category { Id = 113424, ParentId = 112857, Name = "Decoders, multiplexers, switches" } }, + {114028, new Category { Id = 114028, ParentId = 112857, Name = "FIFOs memory" } }, + {113426, new Category { Id = 113426, ParentId = 112857, Name = "Flip-Flops" } }, + {113427, new Category { Id = 113427, ParentId = 112857, Name = "Gates, inverters" } }, + {113428, new Category { Id = 113428, ParentId = 112857, Name = "Latches" } }, + {113429, new Category { Id = 113429, ParentId = 112857, Name = "Level translators" } }, + {113430, new Category { Id = 113430, ParentId = 112857, Name = "Multivibrators" } }, + {113431, new Category { Id = 113431, ParentId = 112857, Name = "Shift registers" } }, + {113432, new Category { Id = 113432, ParentId = 112857, Name = "Other logic integrated circuits" } }, + {113417, new Category { Id = 113417, ParentId = 112857, Name = "Programmable circuits" } }, + {100590, new Category { Id = 100590, ParentId = 100283, Name = "Microcontrollers and Microprocessors" } }, + {112859, new Category { Id = 112859, ParentId = 100590, Name = "Microchip Microcontrollers" } }, + {113636, new Category { Id = 113636, ParentId = 112859, Name = "8-bit 8051 family" } }, + {113637, new Category { Id = 113637, ParentId = 112859, Name = "8-bit AVR family" } }, + {100314, new Category { Id = 100314, ParentId = 112859, Name = "8-bit PIC family" } }, + {112860, new Category { Id = 112860, ParentId = 112859, Name = "16-bit PIC family" } }, + {113638, new Category { Id = 113638, ParentId = 112859, Name = "16-bit dsPIC family" } }, + {113639, new Category { Id = 113639, ParentId = 112859, Name = "32-bit AVR32 family" } }, + {112861, new Category { Id = 112861, ParentId = 112859, Name = "32-bit PIC32 family" } }, + {113640, new Category { Id = 113640, ParentId = 112859, Name = "32-bit ARM family" } }, + {113781, new Category { Id = 113781, ParentId = 100590, Name = "Microchip Microprocessors" } }, + {113634, new Category { Id = 113634, ParentId = 100590, Name = "Infineon Technologies microcontrollers" } }, + {112865, new Category { Id = 112865, ParentId = 100590, Name = "NXP microcontrollers" } }, + {100588, new Category { Id = 100588, ParentId = 112865, Name = "ARM NXP microcontrollers" } }, + {113635, new Category { Id = 113635, ParentId = 100590, Name = "Texas Instruments microcontrollers" } }, + {112866, new Category { Id = 112866, ParentId = 100590, Name = "ST microcontrollers" } }, + {100585, new Category { Id = 100585, ParentId = 100590, Name = "Microcontrollers - others" } }, + {100286, new Category { Id = 100286, ParentId = 100283, Name = "Memories - integrated circuits" } }, + {112867, new Category { Id = 112867, ParentId = 100286, Name = "SRAM memories - integrated circuits" } }, + {112868, new Category { Id = 112868, ParentId = 112867, Name = "Serial SRAM memories - integrated circ." } }, + {100282, new Category { Id = 100282, ParentId = 112867, Name = "Parallel SRAM memories - integ. circ." } }, + {112869, new Category { Id = 112869, ParentId = 100286, Name = "DRAM memories - integrated circuits" } }, + {100279, new Category { Id = 100279, ParentId = 100286, Name = "EPROM memories - integrated circuits" } }, + {112870, new Category { Id = 112870, ParentId = 100286, Name = "EEPROM memories - integrated circuits" } }, + {100280, new Category { Id = 100280, ParentId = 112870, Name = "Serial EEPROM memories - integ. circ." } }, + {112871, new Category { Id = 112871, ParentId = 112870, Name = "Parallel EEPROM memories - integ. circ." } }, + {112872, new Category { Id = 112872, ParentId = 100286, Name = "FLASH memories - integrated circuits" } }, + {112873, new Category { Id = 112873, ParentId = 112872, Name = "Serial FLASH memories - integrated circ." } }, + {100278, new Category { Id = 100278, ParentId = 112872, Name = "Parallel FLASH memories - integ. circ." } }, + {100424, new Category { Id = 100424, ParentId = 100286, Name = "FRAM memories - integrated circuits" } }, + {112874, new Category { Id = 112874, ParentId = 100286, Name = "Memories others - integrated circuits" } }, + {100284, new Category { Id = 100284, ParentId = 100283, Name = "Peripheral integrated circuits" } }, + {112875, new Category { Id = 112875, ParentId = 100284, Name = "Watchdog and reset circuits" } }, + {113598, new Category { Id = 113598, ParentId = 100284, Name = "Authentification integrated circuits" } }, + {112876, new Category { Id = 112876, ParentId = 100284, Name = "Supervisor circuits" } }, + {100435, new Category { Id = 100435, ParentId = 100284, Name = "RTC circuits" } }, + {112877, new Category { Id = 112877, ParentId = 100284, Name = "A/D converters - integrated circuits" } }, + {112878, new Category { Id = 112878, ParentId = 100284, Name = "D/A converters - integrated circuits" } }, + {100222, new Category { Id = 100222, ParentId = 100284, Name = "Analog multiplexers and switches" } }, + {112879, new Category { Id = 112879, ParentId = 100283, Name = "Voltage regulators - integrated circuits" } }, + {100581, new Category { Id = 100581, ParentId = 112879, Name = "Linear regulators - integrated circuits" } }, + {100215, new Category { Id = 100215, ParentId = 100581, Name = "Unregulated voltage regulators" } }, + {112880, new Category { Id = 112880, ParentId = 100581, Name = "LDO unregulated voltage regulators" } }, + {100582, new Category { Id = 100582, ParentId = 100581, Name = "Regulated voltage regulators" } }, + {112881, new Category { Id = 112881, ParentId = 100581, Name = "LDO regulated voltage regulators" } }, + {112882, new Category { Id = 112882, ParentId = 112879, Name = "Switched regulators - integrated circ." } }, + {100220, new Category { Id = 100220, ParentId = 112882, Name = "Voltage regulators - DC/DC circuits" } }, + {112883, new Category { Id = 112883, ParentId = 112882, Name = "Voltage regulators - PWM circuits" } }, + {100218, new Category { Id = 100218, ParentId = 112879, Name = "Reference voltage sources - circuits" } }, + {112884, new Category { Id = 112884, ParentId = 112879, Name = "Battery and battery cells controllers" } }, + {100219, new Category { Id = 100219, ParentId = 100283, Name = "RTV - audio integrated circuits" } }, + {100214, new Category { Id = 100214, ParentId = 100283, Name = "Hybrid integrated circuits" } }, + {112885, new Category { Id = 112885, ParentId = 100283, Name = "Integrated circuits - others" } }, + {21, new Category { Id = 21, ParentId = 112140, Name = "Semiconductors - accessories" } }, + {100142, new Category { Id = 100142, ParentId = 21, Name = "Standard DIP sockets" } }, + {100144, new Category { Id = 100144, ParentId = 21, Name = "PLCC sockets" } }, + {100143, new Category { Id = 100143, ParentId = 21, Name = "Precision sockets" } }, + {100145, new Category { Id = 100145, ParentId = 21, Name = "Test sockets" } }, + {100095, new Category { Id = 100095, ParentId = 21, Name = "Heatsinks" } }, + {100096, new Category { Id = 100096, ParentId = 21, Name = "Heatsinks - equipment" } }, + {112888, new Category { Id = 112888, ParentId = 21, Name = "Peltier modules" } }, + {112889, new Category { Id = 112889, ParentId = 112140, Name = "Programmers and erasers" } }, + {112890, new Category { Id = 112890, ParentId = 112889, Name = "Programmers" } }, + {112891, new Category { Id = 112891, ParentId = 112889, Name = "UV erasers" } }, + {113757, new Category { Id = 113757, ParentId = 112889, Name = "Programmer accessories" } }, + {100636, new Category { Id = 100636, ParentId = 112140, Name = "Development kits" } }, + {112892, new Category { Id = 112892, ParentId = 100636, Name = "Microchip development kits" } }, + {112894, new Category { Id = 112894, ParentId = 100636, Name = "NXP development kits" } }, + {113434, new Category { Id = 113434, ParentId = 100636, Name = "STM development kits" } }, + {113435, new Category { Id = 113435, ParentId = 100636, Name = "TI development kits" } }, + {113240, new Category { Id = 113240, ParentId = 100636, Name = "Development Boards for Arduino" } }, + {118087, new Category { Id = 118087, ParentId = 113240, Name = "Arduino Solutions" } }, + {118088, new Category { Id = 118088, ParentId = 113240, Name = "Solutions Compatible with Arduino" } }, + {113718, new Category { Id = 113718, ParentId = 100636, Name = "Development kits for data transmission" } }, + {112895, new Category { Id = 112895, ParentId = 100636, Name = "Development kits - others" } }, + {113614, new Category { Id = 113614, ParentId = 100636, Name = "Add-on boards" } }, + {113610, new Category { Id = 113610, ParentId = 100636, Name = "Development kits - accessories" } }, + {113191, new Category { Id = 113191, ParentId = 100636, Name = "Compilers" } }, + {113192, new Category { Id = 113192, ParentId = 112140, Name = "Communication modules" } }, + {113719, new Category { Id = 113719, ParentId = 113192, Name = "USB modules" } }, + {113720, new Category { Id = 113720, ParentId = 113192, Name = "Ethernet modules" } }, + {113721, new Category { Id = 113721, ParentId = 113192, Name = "RFID modules and readers" } }, + {113194, new Category { Id = 113194, ParentId = 113192, Name = "RF modules" } }, + {113195, new Category { Id = 113195, ParentId = 113192, Name = "M2M (GPRS/LTE/5G) modules" } }, + {113196, new Category { Id = 113196, ParentId = 113192, Name = "IoT (WiFi/Bluetooth) modules" } }, + {113723, new Category { Id = 113723, ParentId = 113192, Name = "GNSS (GPS) modules" } }, + {113198, new Category { Id = 113198, ParentId = 113192, Name = "Communication modules - others" } }, + {113594, new Category { Id = 113594, ParentId = 113192, Name = "Accessories for Communication Modules" } }, + {113384, new Category { Id = 113384, ParentId = 113383, Name = "WiFi/Bluetooth antennas" } }, + {113385, new Category { Id = 113385, ParentId = 113383, Name = "GPS antennas" } }, + {113386, new Category { Id = 113386, ParentId = 113383, Name = "GSM antennas" } }, + {113387, new Category { Id = 113387, ParentId = 113383, Name = "RF antennas" } }, + {113784, new Category { Id = 113784, ParentId = 112140, Name = "Obsolete" } }, + {113611, new Category { Id = 113611, ParentId = 111000, Name = "Embedded and IoT systems" } }, + {113192, new Category { Id = 113192, ParentId = 112140, Name = "Communication modules" } }, + {113719, new Category { Id = 113719, ParentId = 113192, Name = "USB modules" } }, + {113720, new Category { Id = 113720, ParentId = 113192, Name = "Ethernet modules" } }, + {113721, new Category { Id = 113721, ParentId = 113192, Name = "RFID modules and readers" } }, + {113194, new Category { Id = 113194, ParentId = 113192, Name = "RF modules" } }, + {113195, new Category { Id = 113195, ParentId = 113192, Name = "M2M (GPRS/LTE/5G) modules" } }, + {113196, new Category { Id = 113196, ParentId = 113192, Name = "IoT (WiFi/Bluetooth) modules" } }, + {113723, new Category { Id = 113723, ParentId = 113192, Name = "GNSS (GPS) modules" } }, + {113198, new Category { Id = 113198, ParentId = 113192, Name = "Communication modules - others" } }, + {113594, new Category { Id = 113594, ParentId = 113192, Name = "Accessories for Communication Modules" } }, + {113384, new Category { Id = 113384, ParentId = 113383, Name = "WiFi/Bluetooth antennas" } }, + {113385, new Category { Id = 113385, ParentId = 113383, Name = "GPS antennas" } }, + {113386, new Category { Id = 113386, ParentId = 113383, Name = "GSM antennas" } }, + {113387, new Category { Id = 113387, ParentId = 113383, Name = "RF antennas" } }, + {113612, new Category { Id = 113612, ParentId = 113611, Name = "Single board computers" } }, + {113613, new Category { Id = 113613, ParentId = 113611, Name = "Accessories for Embedded systems" } }, + {113542, new Category { Id = 113542, ParentId = 100431, Name = "Enclosure for Embedded Systems" } }, + {118182, new Category { Id = 118182, ParentId = 113643, Name = "Memory Modules" } }, + {113240, new Category { Id = 113240, ParentId = 100636, Name = "Development Boards for Arduino" } }, + {118087, new Category { Id = 118087, ParentId = 113240, Name = "Arduino Solutions" } }, + {118088, new Category { Id = 118088, ParentId = 113240, Name = "Solutions Compatible with Arduino" } }, + {113439, new Category { Id = 113439, ParentId = 112917, Name = "Intelligent displays modules" } }, + {100327, new Category { Id = 100327, ParentId = 111000, Name = "Optoelectronics" } }, + {100684, new Category { Id = 100684, ParentId = 100327, Name = "LEDs" } }, + {100134, new Category { Id = 100134, ParentId = 100684, Name = "THT LEDs" } }, + {100324, new Category { Id = 100324, ParentId = 100693, Name = "Holders" } }, + {113346, new Category { Id = 113346, ParentId = 100693, Name = "Spacers for LED" } }, + {112896, new Category { Id = 112896, ParentId = 100134, Name = "THT LEDs Round" } }, + {112902, new Category { Id = 112902, ParentId = 100134, Name = "THT LEDs oval" } }, + {112903, new Category { Id = 112903, ParentId = 100134, Name = "THT LEDs rectangle" } }, + {112904, new Category { Id = 112904, ParentId = 100134, Name = "THT LEDs Super Flux" } }, + {112905, new Category { Id = 112905, ParentId = 100134, Name = "Backlights" } }, + {112906, new Category { Id = 112906, ParentId = 100134, Name = "THT LEDs - others" } }, + {100404, new Category { Id = 100404, ParentId = 100684, Name = "SMD LEDs" } }, + {100692, new Category { Id = 100692, ParentId = 100693, Name = "Lightpipes for LED" } }, + {113362, new Category { Id = 113362, ParentId = 100404, Name = "SMD white LEDs" } }, + {113363, new Category { Id = 113363, ParentId = 100404, Name = "SMD colour LEDs" } }, + {100470, new Category { Id = 100470, ParentId = 100684, Name = "Power LEDs" } }, + {100691, new Category { Id = 100691, ParentId = 100693, Name = "Lens" } }, + {113364, new Category { Id = 113364, ParentId = 100470, Name = "White power LEDs" } }, + {113365, new Category { Id = 113365, ParentId = 113364, Name = "White power LEDs - COB" } }, + {113366, new Category { Id = 113366, ParentId = 113364, Name = "White power LEDs - Emiter" } }, + {113367, new Category { Id = 113367, ParentId = 100470, Name = "Colour power LEDs" } }, + {113369, new Category { Id = 113369, ParentId = 113367, Name = "Colour power LEDs - Emiter" } }, + {113470, new Category { Id = 113470, ParentId = 100684, Name = "Special effect LED's" } }, + {100425, new Category { Id = 100425, ParentId = 100684, Name = "IR LEDs" } }, + {113370, new Category { Id = 113370, ParentId = 100684, Name = "UV LEDs" } }, + {113461, new Category { Id = 113461, ParentId = 100684, Name = "Plants growth LED" } }, + {118173, new Category { Id = 118173, ParentId = 100684, Name = "LED Kits" } }, + {113579, new Category { Id = 113579, ParentId = 100684, Name = "LED light sources" } }, + {113347, new Category { Id = 113347, ParentId = 100336, Name = "Profiles for LED" } }, + {113576, new Category { Id = 113576, ParentId = 113579, Name = "Light sources - LED ribbon" } }, + {113577, new Category { Id = 113577, ParentId = 113579, Name = "Light sources - LED bars" } }, + {113578, new Category { Id = 113578, ParentId = 113579, Name = "Light sources - LED modules" } }, + {113582, new Category { Id = 113582, ParentId = 100327, Name = "LED indicators" } }, + {113583, new Category { Id = 113583, ParentId = 113582, Name = "LED PCB indicators" } }, + {100325, new Category { Id = 100325, ParentId = 93, Name = "LED Panel Mount Indicators" } }, + {112917, new Category { Id = 112917, ParentId = 100327, Name = "Displays" } }, + {100135, new Category { Id = 100135, ParentId = 112917, Name = "LED displays" } }, + {112918, new Category { Id = 112918, ParentId = 100135, Name = "7-segment LED displays" } }, + {112922, new Category { Id = 112922, ParentId = 100135, Name = "LED displays - matrix" } }, + {112923, new Category { Id = 112923, ParentId = 100135, Name = "LED displays - others" } }, + {112924, new Category { Id = 112924, ParentId = 112917, Name = "OLED displays" } }, + {112925, new Category { Id = 112925, ParentId = 112924, Name = "Alphanumeric OLED displays" } }, + {112280, new Category { Id = 112280, ParentId = 112924, Name = "Graphical OLED displays" } }, + {100136, new Category { Id = 100136, ParentId = 112917, Name = "LCD displays" } }, + {112281, new Category { Id = 112281, ParentId = 100136, Name = "LCD digital displays" } }, + {112282, new Category { Id = 112282, ParentId = 100136, Name = "LCD alphanumeric displays" } }, + {112283, new Category { Id = 112283, ParentId = 100136, Name = "LCD graphic displays" } }, + {112284, new Category { Id = 112284, ParentId = 112917, Name = "TFT displays" } }, + {113463, new Category { Id = 113463, ParentId = 112917, Name = "VFD displays" } }, + {113439, new Category { Id = 113439, ParentId = 112917, Name = "Intelligent displays modules" } }, + {113459, new Category { Id = 113459, ParentId = 112917, Name = "E-paper" } }, + {113460, new Category { Id = 113460, ParentId = 112917, Name = "Displays - accessories" } }, + {113667, new Category { Id = 113667, ParentId = 100228, Name = "HMI Panels" } }, + {112291, new Category { Id = 112291, ParentId = 100327, Name = "Optocouplers" } }, + {100138, new Category { Id = 100138, ParentId = 112291, Name = "Optocouplers - analog output" } }, + {112294, new Category { Id = 112294, ParentId = 112291, Name = "Optocouplers - digital output" } }, + {112297, new Category { Id = 112297, ParentId = 112291, Name = "Optocouplers - others" } }, + {113580, new Category { Id = 113580, ParentId = 112291, Name = "Optotriacs" } }, + {100422, new Category { Id = 100422, ParentId = 100327, Name = "Laser elements" } }, + {112302, new Category { Id = 112302, ParentId = 100422, Name = "Laser diodes" } }, + {112303, new Category { Id = 112303, ParentId = 100422, Name = "Laser modules" } }, + {100140, new Category { Id = 100140, ParentId = 100327, Name = "Photoelements" } }, + {112304, new Category { Id = 112304, ParentId = 100140, Name = "Photodiodes" } }, + {112305, new Category { Id = 112305, ParentId = 100140, Name = "IR receiver modules" } }, + {112306, new Category { Id = 112306, ParentId = 100140, Name = "Phototransistors" } }, + {100141, new Category { Id = 100141, ParentId = 100140, Name = "Photoresistors" } }, + {100693, new Category { Id = 100693, ParentId = 100327, Name = "LEDs accessories" } }, + {113347, new Category { Id = 113347, ParentId = 100336, Name = "Profiles for LED" } }, + {100324, new Category { Id = 100324, ParentId = 100693, Name = "Holders" } }, + {100692, new Category { Id = 100692, ParentId = 100693, Name = "Lightpipes for LED" } }, + {100691, new Category { Id = 100691, ParentId = 100693, Name = "Lens" } }, + {113176, new Category { Id = 113176, ParentId = 100693, Name = "Heatsinks for LED" } }, + {113346, new Category { Id = 113346, ParentId = 100693, Name = "Spacers for LED" } }, + {112308, new Category { Id = 112308, ParentId = 100693, Name = "Others LEDs Accessories" } }, + {113414, new Category { Id = 113414, ParentId = 113415, Name = "Cooling Modules" } }, + {113653, new Category { Id = 113653, ParentId = 112530, Name = "LED Power Supplies" } }, + {113567, new Category { Id = 113567, ParentId = 111000, Name = "Light sources" } }, + {113568, new Category { Id = 113568, ParentId = 113567, Name = "Miniature light sources" } }, + {113569, new Category { Id = 113569, ParentId = 113567, Name = "Light sources - lighting" } }, + {113654, new Category { Id = 113654, ParentId = 113567, Name = "Light sources - car lighting" } }, + {113570, new Category { Id = 113570, ParentId = 113567, Name = "Light sources - EL elements" } }, + {113574, new Category { Id = 113574, ParentId = 113567, Name = "Light sources - holders" } }, + {113575, new Category { Id = 113575, ParentId = 113567, Name = "Torches" } }, + {113576, new Category { Id = 113576, ParentId = 113579, Name = "Light sources - LED ribbon" } }, + {113577, new Category { Id = 113577, ParentId = 113579, Name = "Light sources - LED bars" } }, + {113578, new Category { Id = 113578, ParentId = 113579, Name = "Light sources - LED modules" } }, + {112309, new Category { Id = 112309, ParentId = 111000, Name = "Passives" } }, + {100299, new Category { Id = 100299, ParentId = 112309, Name = "Resistors" } }, + {100300, new Category { Id = 100300, ParentId = 100299, Name = "SMD resistors" } }, + {112312, new Category { Id = 112312, ParentId = 100299, Name = "THT Resistors" } }, + {100511, new Category { Id = 100511, ParentId = 100299, Name = "Power resistors" } }, + {100298, new Category { Id = 100298, ParentId = 100299, Name = "Other Resistors" } }, + {113148, new Category { Id = 113148, ParentId = 100299, Name = "Heating resistors" } }, + {112321, new Category { Id = 112321, ParentId = 100299, Name = "Resistor networks" } }, + {113512, new Category { Id = 113512, ParentId = 113509, Name = "Audio resistors" } }, + {112323, new Category { Id = 112323, ParentId = 112309, Name = "NTC thermistors" } }, + {100402, new Category { Id = 100402, ParentId = 112323, Name = "Measurement NTC thermistors" } }, + {113183, new Category { Id = 113183, ParentId = 100402, Name = "THT measurement NTC thermistors" } }, + {113184, new Category { Id = 113184, ParentId = 100402, Name = "SMD measurement NTC thermistors" } }, + {112324, new Category { Id = 112324, ParentId = 112323, Name = "Protection NTC thermistors" } }, + {24, new Category { Id = 24, ParentId = 112309, Name = "Potentiometers" } }, + {112325, new Category { Id = 112325, ParentId = 24, Name = "Trimmers" } }, + {112326, new Category { Id = 112326, ParentId = 112325, Name = "SMD trimmers" } }, + {100561, new Category { Id = 100561, ParentId = 112326, Name = "Single turn SMD trimmers" } }, + {112327, new Category { Id = 112327, ParentId = 112326, Name = "Multiturn SMD trimmers" } }, + {100015, new Category { Id = 100015, ParentId = 112325, Name = "THT trimmers" } }, + {100595, new Category { Id = 100595, ParentId = 100015, Name = "Single turn THT trimmers" } }, + {100017, new Category { Id = 100017, ParentId = 100015, Name = "19mm multiturn THT trimmers" } }, + {100129, new Category { Id = 100129, ParentId = 100015, Name = "1/4 inch multiturn THT trimmers" } }, + {113254, new Category { Id = 113254, ParentId = 100015, Name = "5/16 inch multiturn THT trimmers" } }, + {100016, new Category { Id = 100016, ParentId = 100015, Name = "3/8 inch multiturn THT trimmers" } }, + {113241, new Category { Id = 113241, ParentId = 100015, Name = "1/2 inch multiturn THT trimmers" } }, + {113242, new Category { Id = 113242, ParentId = 112325, Name = "Trimmer adjustment tools" } }, + {112328, new Category { Id = 112328, ParentId = 24, Name = "Shaft potentiometers" } }, + {112329, new Category { Id = 112329, ParentId = 112328, Name = "Single turn shaft potentiometers" } }, + {100562, new Category { Id = 100562, ParentId = 112329, Name = "Carbon single turn potentiometers" } }, + {112330, new Category { Id = 112330, ParentId = 112329, Name = "Cermet single turn potentiometers" } }, + {100535, new Category { Id = 100535, ParentId = 112329, Name = "Wire single turn potentiometers" } }, + {100018, new Category { Id = 100018, ParentId = 112329, Name = "Cond. plastic single turn potentiometers" } }, + {112331, new Category { Id = 112331, ParentId = 112328, Name = "Multiturn shaft potentiometers" } }, + {112332, new Category { Id = 112332, ParentId = 112331, Name = "Cermet multiturn potentiometers" } }, + {100024, new Category { Id = 100024, ParentId = 112331, Name = "Wire multiturn potentiometers" } }, + {112333, new Category { Id = 112333, ParentId = 24, Name = "Slide potentiometers" } }, + {113595, new Category { Id = 113595, ParentId = 113509, Name = "Audio potentiometers" } }, + {113519, new Category { Id = 113519, ParentId = 112309, Name = "Encoders" } }, + {113520, new Category { Id = 113520, ParentId = 113519, Name = "Absolute type encoders" } }, + {113521, new Category { Id = 113521, ParentId = 113519, Name = "Incremental type encoders" } }, + {112334, new Category { Id = 112334, ParentId = 112309, Name = "Knobs" } }, + {100026, new Category { Id = 100026, ParentId = 112334, Name = "Knobs for shaft potentiometers" } }, + {112335, new Category { Id = 112335, ParentId = 112334, Name = "Precision knobs for shaft potentiometers" } }, + {112336, new Category { Id = 112336, ParentId = 112334, Name = "Knobs for trimmers" } }, + {113133, new Category { Id = 113133, ParentId = 112334, Name = "Knobs for slide potentiometers" } }, + {112337, new Category { Id = 112337, ParentId = 112334, Name = "Scales" } }, + {26, new Category { Id = 26, ParentId = 112309, Name = "Capacitors" } }, + {100560, new Category { Id = 100560, ParentId = 26, Name = "MLCC capacitors" } }, + {113537, new Category { Id = 113537, ParentId = 100560, Name = "MLCC SMD capacitors" } }, + {100568, new Category { Id = 100568, ParentId = 100560, Name = "MLCC THT capacitors" } }, + {100558, new Category { Id = 100558, ParentId = 100560, Name = "MLCC array capacitors" } }, + {100003, new Category { Id = 100003, ParentId = 26, Name = "Ceramic capacitors" } }, + {112339, new Category { Id = 112339, ParentId = 100003, Name = "THT ceramic capacitors" } }, + {100556, new Category { Id = 100556, ParentId = 26, Name = "Electrolytic capacitors" } }, + {112341, new Category { Id = 112341, ParentId = 100556, Name = "SMD electrolytic capacitors" } }, + {112342, new Category { Id = 112342, ParentId = 100556, Name = "THT electrolytic capacitors" } }, + {113265, new Category { Id = 113265, ParentId = 100556, Name = "SNAP-IN electrolytic capacitors" } }, + {114042, new Category { Id = 114042, ParentId = 100556, Name = "Screw terminal and others el. capacitors" } }, + {113764, new Category { Id = 113764, ParentId = 113225, Name = "SMD Hybrid Capacitors" } }, + {112350, new Category { Id = 112350, ParentId = 26, Name = "Film Capacitors" } }, + {100265, new Category { Id = 100265, ParentId = 112350, Name = "THT Film Capacitors" } }, + {112351, new Category { Id = 112351, ParentId = 112350, Name = "SMD Film Capacitors" } }, + {113466, new Category { Id = 113466, ParentId = 26, Name = "Paper capacitors" } }, + {100263, new Category { Id = 100263, ParentId = 26, Name = "Motor capacitors" } }, + {112353, new Category { Id = 112353, ParentId = 26, Name = "Lighting capacitors" } }, + {113244, new Category { Id = 113244, ParentId = 26, Name = "Tantalum capacitors" } }, + {113245, new Category { Id = 113245, ParentId = 113244, Name = "SMD tantalum capacitors" } }, + {113246, new Category { Id = 113246, ParentId = 113244, Name = "THT tantalum capacitors" } }, + {113247, new Category { Id = 113247, ParentId = 113244, Name = "Polymer - tantalum capacitors" } }, + {100634, new Category { Id = 100634, ParentId = 26, Name = "SMD niobium capacitors" } }, + {100266, new Category { Id = 100266, ParentId = 26, Name = "SMD capacitors - others" } }, + {100339, new Category { Id = 100339, ParentId = 26, Name = "Trimmers" } }, + {113190, new Category { Id = 113190, ParentId = 26, Name = "Supercapacitors" } }, + {113225, new Category { Id = 113225, ParentId = 26, Name = "Polymer and Hybrid Capacitors" } }, + {113247, new Category { Id = 113247, ParentId = 113244, Name = "Polymer - tantalum capacitors" } }, + {113762, new Category { Id = 113762, ParentId = 113225, Name = "SMD Polymer Capacitors" } }, + {113763, new Category { Id = 113763, ParentId = 113225, Name = "THT Polymer Capacitors" } }, + {113764, new Category { Id = 113764, ParentId = 113225, Name = "SMD Hybrid Capacitors" } }, + {118085, new Category { Id = 118085, ParentId = 113225, Name = "THT Hybrid Capacitors" } }, + {113511, new Category { Id = 113511, ParentId = 113509, Name = "Audio capacitors" } }, + {113514, new Category { Id = 113514, ParentId = 113511, Name = "Audio polypropylene capacitors" } }, + {113515, new Category { Id = 113515, ParentId = 113511, Name = "Audio electrolytic capacitors" } }, + {113516, new Category { Id = 113516, ParentId = 113515, Name = "THT audio electrolytic capacitors" } }, + {113189, new Category { Id = 113189, ParentId = 112309, Name = "HV generators" } }, + {27, new Category { Id = 27, ParentId = 112309, Name = "Quartz crystals and filters" } }, + {100269, new Category { Id = 100269, ParentId = 27, Name = "Quartz crystals" } }, + {112354, new Category { Id = 112354, ParentId = 100269, Name = "SMD quartz crystals" } }, + {112355, new Category { Id = 112355, ParentId = 100269, Name = "THT quartz crystals" } }, + {100272, new Category { Id = 100272, ParentId = 27, Name = "Quartz generators" } }, + {112356, new Category { Id = 112356, ParentId = 100272, Name = "SMD quartz generators" } }, + {112357, new Category { Id = 112357, ParentId = 100272, Name = "THT quartz generators" } }, + {100270, new Category { Id = 100270, ParentId = 27, Name = "Ceramic filters and resonators" } }, + {113181, new Category { Id = 113181, ParentId = 100270, Name = "SMD ceramic filters and resonators" } }, + {113182, new Category { Id = 113182, ParentId = 100270, Name = "THT ceramic filters and resonators" } }, + {100271, new Category { Id = 100271, ParentId = 27, Name = "SAW filters and resonators" } }, + {100406, new Category { Id = 100406, ParentId = 112309, Name = "Inductors" } }, + {112358, new Category { Id = 112358, ParentId = 100406, Name = "SMD coils" } }, + {112359, new Category { Id = 112359, ParentId = 100406, Name = "SMD inductors" } }, + {113523, new Category { Id = 113523, ParentId = 112359, Name = "SMD 0402 inductors" } }, + {113524, new Category { Id = 113524, ParentId = 112359, Name = "SMD 0603 inductors" } }, + {113525, new Category { Id = 113525, ParentId = 112359, Name = "SMD 0805 inductors" } }, + {113526, new Category { Id = 113526, ParentId = 112359, Name = "SMD 1008 inductors" } }, + {113527, new Category { Id = 113527, ParentId = 112359, Name = "SMD 1206 inductors" } }, + {113528, new Category { Id = 113528, ParentId = 112359, Name = "SMD 1210 inductors" } }, + {113529, new Category { Id = 113529, ParentId = 112359, Name = "SMD 1812 inductors" } }, + {113530, new Category { Id = 113530, ParentId = 112359, Name = "SMD 2220 inductors" } }, + {113536, new Category { Id = 113536, ParentId = 112359, Name = "SMD inductors - others" } }, + {112360, new Category { Id = 112360, ParentId = 100406, Name = "SMD power inductors" } }, + {112361, new Category { Id = 112361, ParentId = 100406, Name = "THT inductors" } }, + {100345, new Category { Id = 100345, ParentId = 112361, Name = "Toroidal inductors" } }, + {100343, new Category { Id = 100343, ParentId = 112361, Name = "Axial inductors" } }, + {100344, new Category { Id = 100344, ParentId = 112361, Name = "Vertical inductors" } }, + {113510, new Category { Id = 113510, ParentId = 113509, Name = "Audio coils" } }, + {113557, new Category { Id = 113557, ParentId = 112309, Name = "EMI/EMC components" } }, + {113550, new Category { Id = 113550, ParentId = 113557, Name = "EMI/EMC ferrites" } }, + {113552, new Category { Id = 113552, ParentId = 113550, Name = "Ferrites for cables" } }, + {113553, new Category { Id = 113553, ParentId = 113550, Name = "Ferrite - inductors" } }, + {113554, new Category { Id = 113554, ParentId = 113550, Name = "Ferrite - beads" } }, + {113555, new Category { Id = 113555, ParentId = 113550, Name = "Ring ferrites" } }, + {113556, new Category { Id = 113556, ParentId = 113550, Name = "Ferrite sleeves" } }, + {118086, new Category { Id = 118086, ParentId = 113550, Name = "Ferrite plates" } }, + {113558, new Category { Id = 113558, ParentId = 113557, Name = "EMI/EMC sheets" } }, + {100342, new Category { Id = 100342, ParentId = 112309, Name = "Suppression filters" } }, + {112930, new Category { Id = 112930, ParentId = 100342, Name = "SMD suppression filters" } }, + {112931, new Category { Id = 112931, ParentId = 100342, Name = "THT suppression filters" } }, + {112932, new Category { Id = 112932, ParentId = 100342, Name = "Suppression filters - others" } }, + {113132, new Category { Id = 113132, ParentId = 100342, Name = "Three-phase filters" } }, + {113383, new Category { Id = 113383, ParentId = 112309, Name = "Antennas" } }, + {113384, new Category { Id = 113384, ParentId = 113383, Name = "WiFi/Bluetooth antennas" } }, + {113385, new Category { Id = 113385, ParentId = 113383, Name = "GPS antennas" } }, + {113386, new Category { Id = 113386, ParentId = 113383, Name = "GSM antennas" } }, + {113387, new Category { Id = 113387, ParentId = 113383, Name = "RF antennas" } }, + {29, new Category { Id = 29, ParentId = 112309, Name = "Varistors" } }, + {112933, new Category { Id = 112933, ParentId = 29, Name = "SMD varistors" } }, + {100397, new Category { Id = 100397, ParentId = 29, Name = "THT varistors" } }, + {112934, new Category { Id = 112934, ParentId = 29, Name = "Block varistors" } }, + {100400, new Category { Id = 100400, ParentId = 112309, Name = "Surge arrestors" } }, + {112935, new Category { Id = 112935, ParentId = 100400, Name = "SMD surge arrestors" } }, + {112936, new Category { Id = 112936, ParentId = 100400, Name = "THT surge arrestors" } }, + {113142, new Category { Id = 113142, ParentId = 112309, Name = "Power factor correction" } }, + {113143, new Category { Id = 113143, ParentId = 113142, Name = "Capacitors" } }, + {113999, new Category { Id = 113999, ParentId = 113142, Name = "Blocking reactors" } }, + {113145, new Category { Id = 113145, ParentId = 113142, Name = "Reactive power controllers" } }, + {113236, new Category { Id = 113236, ParentId = 113142, Name = "Capacitor switching contactors" } }, + {113509, new Category { Id = 113509, ParentId = 112309, Name = "Audio components" } }, + {100207, new Category { Id = 100207, ParentId = 63, Name = "Speakers" } }, + {113510, new Category { Id = 113510, ParentId = 113509, Name = "Audio coils" } }, + {113511, new Category { Id = 113511, ParentId = 113509, Name = "Audio capacitors" } }, + {113514, new Category { Id = 113514, ParentId = 113511, Name = "Audio polypropylene capacitors" } }, + {113515, new Category { Id = 113515, ParentId = 113511, Name = "Audio electrolytic capacitors" } }, + {113516, new Category { Id = 113516, ParentId = 113515, Name = "THT audio electrolytic capacitors" } }, + {113595, new Category { Id = 113595, ParentId = 113509, Name = "Audio potentiometers" } }, + {113512, new Category { Id = 113512, ParentId = 113509, Name = "Audio resistors" } }, + {113513, new Category { Id = 113513, ParentId = 113509, Name = "Audio crossovers" } }, + {46, new Category { Id = 46, ParentId = 111000, Name = "Connectors" } }, + {30, new Category { Id = 30, ParentId = 46, Name = "Signal connectors" } }, + {112937, new Category { Id = 112937, ParentId = 30, Name = "Pin headers" } }, + {100350, new Category { Id = 100350, ParentId = 30, Name = "CE100 connectors 2,54mm" } }, + {100351, new Category { Id = 100351, ParentId = 30, Name = "CE156 connectors 3,96mm" } }, + {100036, new Category { Id = 100036, ParentId = 30, Name = "DIN 41.612, DIN 41.617 connectors" } }, + {100352, new Category { Id = 100352, ParentId = 30, Name = "Dubox connectors 2,54mm" } }, + {100639, new Category { Id = 100639, ParentId = 30, Name = "FFC/FPC connectors" } }, + {112938, new Category { Id = 112938, ParentId = 100639, Name = "Connectors FFC/FPC 2.54mm" } }, + {112939, new Category { Id = 112939, ParentId = 100639, Name = "Connectors FFC/FPC 1.25mm" } }, + {112940, new Category { Id = 112940, ParentId = 100639, Name = "Connectors FFC/FPC 1.00mm" } }, + {112941, new Category { Id = 112941, ParentId = 100639, Name = "Connectors FFC/FPC 0.5mm" } }, + {114044, new Category { Id = 114044, ParentId = 100639, Name = "Connectors FFC/FPC 0.3mm" } }, + {118178, new Category { Id = 118178, ParentId = 100639, Name = "Connectors FFC/FPC 0.2mm" } }, + {113269, new Category { Id = 113269, ParentId = 100639, Name = "FFC/FPC ribbon cables" } }, + {112943, new Category { Id = 112943, ParentId = 30, Name = "IDC connectors" } }, + {100033, new Category { Id = 100033, ParentId = 30, Name = "Micro-Match connectors 1,27mm" } }, + {100642, new Category { Id = 100642, ParentId = 30, Name = "Mini-Clamp connectors 2mm" } }, + {100530, new Category { Id = 100530, ParentId = 30, Name = "MTA-100 connectors 2,54mm" } }, + {100638, new Category { Id = 100638, ParentId = 30, Name = "IDC picoflex connectors 1,27mm" } }, + {100569, new Category { Id = 100569, ParentId = 30, Name = "Board-to-board connectors" } }, + {112945, new Category { Id = 112945, ParentId = 30, Name = "Raster signal connectors" } }, + {112946, new Category { Id = 112946, ParentId = 112945, Name = "Raster signal connectors 1,00mm" } }, + {113398, new Category { Id = 113398, ParentId = 112945, Name = "Raster signal connectors 1,20mm" } }, + {112947, new Category { Id = 112947, ParentId = 112945, Name = "Raster signal connectors 1,25mm" } }, + {112948, new Category { Id = 112948, ParentId = 112945, Name = "Raster signal connectors 1,50mm" } }, + {112949, new Category { Id = 112949, ParentId = 112945, Name = "Raster signal connectors 2,00mm" } }, + {100490, new Category { Id = 100490, ParentId = 112945, Name = "Raster signal connectors 2,50mm" } }, + {100491, new Category { Id = 100491, ParentId = 112945, Name = "Raster signal connectors 2,54mm" } }, + {112950, new Category { Id = 112950, ParentId = 112945, Name = "Raster signal connectors 3,00mm" } }, + {113399, new Category { Id = 113399, ParentId = 112945, Name = "Raster signal connectors 3,68mm" } }, + {113400, new Category { Id = 113400, ParentId = 112945, Name = "Raster signal connectors 3,81mm" } }, + {100349, new Category { Id = 100349, ParentId = 112945, Name = "Raster signal connectors 3,96mm" } }, + {113401, new Category { Id = 113401, ParentId = 112945, Name = "Raster signal connectors 4,14mm" } }, + {112951, new Category { Id = 112951, ParentId = 112945, Name = "Raster signal connectors 4,20mm" } }, + {113218, new Category { Id = 113218, ParentId = 112945, Name = "Raster signal connectors 4,50mm" } }, + {113402, new Category { Id = 113402, ParentId = 112945, Name = "Raster signal connectors 5/7,5mm" } }, + {113344, new Category { Id = 113344, ParentId = 112945, Name = "Raster signal connectors 5,00mm" } }, + {113403, new Category { Id = 113403, ParentId = 112945, Name = "Raster signal connectors 5,03mm" } }, + {112952, new Category { Id = 112952, ParentId = 112945, Name = "Raster signal connectors 5,08mm" } }, + {113263, new Category { Id = 113263, ParentId = 112945, Name = "Raster signal connectors 5,70mm" } }, + {113404, new Category { Id = 113404, ParentId = 112945, Name = "Raster signal connectors 6,10mm" } }, + {113405, new Category { Id = 113405, ParentId = 112945, Name = "Raster signal connectors 6,35mm" } }, + {113389, new Category { Id = 113389, ParentId = 112945, Name = "Raster signal connectors 7,50mm" } }, + {113406, new Category { Id = 113406, ParentId = 112945, Name = "Raster signal connectors 10mm" } }, + {31, new Category { Id = 31, ParentId = 46, Name = "Data connectors" } }, + {100038, new Category { Id = 100038, ParentId = 31, Name = "D-Sub connectors" } }, + {113791, new Category { Id = 113791, ParentId = 100038, Name = "D-Sub plugs and sockets" } }, + {113792, new Category { Id = 113792, ParentId = 100038, Name = "Complete D-Sub plugs" } }, + {113793, new Category { Id = 113793, ParentId = 100038, Name = "D-Sub housings" } }, + {113794, new Category { Id = 113794, ParentId = 100038, Name = "D-Sub adaptors" } }, + {113795, new Category { Id = 113795, ParentId = 100038, Name = "D-Sub accessories" } }, + {113410, new Category { Id = 113410, ParentId = 31, Name = "MDR connectors" } }, + {100379, new Category { Id = 100379, ParentId = 31, Name = "USB & IEEE1394 connectors" } }, + {112953, new Category { Id = 112953, ParentId = 31, Name = "RJ connectors" } }, + {100432, new Category { Id = 100432, ParentId = 31, Name = "Card connectors" } }, + {100037, new Category { Id = 100037, ParentId = 31, Name = "Centronics connectors" } }, + {113564, new Category { Id = 113564, ParentId = 31, Name = "Optical connectors" } }, + {112955, new Category { Id = 112955, ParentId = 46, Name = "RF Coaxial connectors" } }, + {113609, new Category { Id = 113609, ParentId = 112955, Name = "4.3-10 connectors" } }, + {100357, new Category { Id = 100357, ParentId = 112955, Name = "BNC connectors" } }, + {100362, new Category { Id = 100362, ParentId = 112955, Name = "UHF & Mini-UHF connectors" } }, + {100358, new Category { Id = 100358, ParentId = 112955, Name = "TNC connectors" } }, + {113538, new Category { Id = 113538, ParentId = 112955, Name = "C connectors" } }, + {100359, new Category { Id = 100359, ParentId = 112955, Name = "N connectors" } }, + {100360, new Category { Id = 100360, ParentId = 112955, Name = "FME connectors" } }, + {100361, new Category { Id = 100361, ParentId = 112955, Name = "SMA, SMB, SMC connectors" } }, + {100449, new Category { Id = 100449, ParentId = 112955, Name = "MCX, MMCX connectors" } }, + {113539, new Category { Id = 113539, ParentId = 112955, Name = "Micro connectors" } }, + {100363, new Category { Id = 100363, ParentId = 112955, Name = "F connectors" } }, + {112956, new Category { Id = 112956, ParentId = 112955, Name = "Coaxial connectors" } }, + {114005, new Category { Id = 114005, ParentId = 112955, Name = "AMC connectors" } }, + {100365, new Category { Id = 100365, ParentId = 112955, Name = "RF adapters" } }, + {33, new Category { Id = 33, ParentId = 46, Name = "Industrial connectors" } }, + {100366, new Category { Id = 100366, ParentId = 33, Name = "Industrial circular connectors" } }, + {112961, new Category { Id = 112961, ParentId = 100366, Name = "AMPHENOL connectors" } }, + {113462, new Category { Id = 113462, ParentId = 100366, Name = "HARTING connectors" } }, + {112963, new Category { Id = 112963, ParentId = 100366, Name = "CM connectors" } }, + {112964, new Category { Id = 112964, ParentId = 100366, Name = "CPC connectors" } }, + {112965, new Category { Id = 112965, ParentId = 100366, Name = "CA connectors" } }, + {113388, new Category { Id = 113388, ParentId = 100366, Name = "7/8\" connectors" } }, + {113626, new Category { Id = 113626, ParentId = 100366, Name = "M5 connectors" } }, + {112966, new Category { Id = 112966, ParentId = 100366, Name = "M8 connectors" } }, + {113785, new Category { Id = 113785, ParentId = 100366, Name = "M9 connectors" } }, + {112967, new Category { Id = 112967, ParentId = 100366, Name = "M12 connectors" } }, + {113505, new Category { Id = 113505, ParentId = 112967, Name = "M12 plugs and sockets" } }, + {113506, new Category { Id = 113506, ParentId = 112967, Name = "M12 connectors with cable" } }, + {113507, new Category { Id = 113507, ParentId = 112967, Name = "M12 adapters" } }, + {113508, new Category { Id = 113508, ParentId = 112967, Name = "M12 connector accessories" } }, + {113411, new Category { Id = 113411, ParentId = 100366, Name = "M16 connectors" } }, + {118175, new Category { Id = 118175, ParentId = 100366, Name = "M18 Connectors" } }, + {113277, new Category { Id = 113277, ParentId = 100366, Name = "M23 connectors" } }, + {118176, new Category { Id = 118176, ParentId = 100366, Name = "M25 Connectors" } }, + {113615, new Category { Id = 113615, ParentId = 100366, Name = "M27 connectors" } }, + {112969, new Category { Id = 112969, ParentId = 100366, Name = "PX connectors" } }, + {112971, new Category { Id = 112971, ParentId = 100366, Name = "UTG connectors" } }, + {113412, new Category { Id = 113412, ParentId = 100366, Name = "LEMO connectors" } }, + {112972, new Category { Id = 112972, ParentId = 100366, Name = "WEIPU connectors" } }, + {113407, new Category { Id = 113407, ParentId = 100366, Name = "SWITCHCRAFT connectors" } }, + {118165, new Category { Id = 118165, ParentId = 100366, Name = "HIROSE connectors" } }, + {118177, new Category { Id = 118177, ParentId = 100366, Name = "BINDER Connectors" } }, + {112977, new Category { Id = 112977, ParentId = 33, Name = "Rectangular multipole connectors" } }, + {112982, new Category { Id = 112982, ParentId = 112977, Name = "G connectors" } }, + {112984, new Category { Id = 112984, ParentId = 112977, Name = "ST connectors" } }, + {113408, new Category { Id = 113408, ParentId = 112977, Name = "EDAC connectors" } }, + {113616, new Category { Id = 113616, ParentId = 112977, Name = "HDC connectors" } }, + {113617, new Category { Id = 113617, ParentId = 113616, Name = "DEGSON Connectors" } }, + {113618, new Category { Id = 113618, ParentId = 113616, Name = "Amphenol connectors" } }, + {113619, new Category { Id = 113619, ParentId = 113616, Name = "HARTING connectors" } }, + {113620, new Category { Id = 113620, ParentId = 113616, Name = "MOLEX connectors" } }, + {113621, new Category { Id = 113621, ParentId = 113616, Name = "ILME connectors" } }, + {113622, new Category { Id = 113622, ParentId = 113616, Name = "LAPP connectors" } }, + {113780, new Category { Id = 113780, ParentId = 113616, Name = "Phoenix Contact Connectors" } }, + {113623, new Category { Id = 113623, ParentId = 113616, Name = "TE Connectivity connectors" } }, + {113624, new Category { Id = 113624, ParentId = 113616, Name = "Weidmuller connectors" } }, + {113739, new Category { Id = 113739, ParentId = 113616, Name = "Wieland connectors" } }, + {114070, new Category { Id = 114070, ParentId = 113616, Name = "HDC connectors - others" } }, + {112985, new Category { Id = 112985, ParentId = 33, Name = "Valve connectors" } }, + {112988, new Category { Id = 112988, ParentId = 33, Name = "Industrial connectors - others" } }, + {118167, new Category { Id = 118167, ParentId = 46, Name = "Military connectors" } }, + {118168, new Category { Id = 118168, ParentId = 118167, Name = "MIL-C-5015 connectors" } }, + {118169, new Category { Id = 118169, ParentId = 118167, Name = "VG95234 connectors" } }, + {118170, new Category { Id = 118170, ParentId = 118167, Name = "D38999 Series I connectors" } }, + {118171, new Category { Id = 118171, ParentId = 118167, Name = "D38999 Series III connectors" } }, + {118172, new Category { Id = 118172, ParentId = 46, Name = "Automotive connectors" } }, + {34, new Category { Id = 34, ParentId = 46, Name = "Power connectors" } }, + {100475, new Category { Id = 100475, ParentId = 34, Name = "AC supply connectors" } }, + {113600, new Category { Id = 113600, ParentId = 100475, Name = "Mains connectors" } }, + {113601, new Category { Id = 113601, ParentId = 100475, Name = "Industrial IEC 60309 connectors" } }, + {113602, new Category { Id = 113602, ParentId = 100475, Name = "IEC 60320 connectors" } }, + {113603, new Category { Id = 113603, ParentId = 100475, Name = "AC connectors - others" } }, + {113584, new Category { Id = 113584, ParentId = 34, Name = "Terminal blocks" } }, + {113585, new Category { Id = 113585, ParentId = 113584, Name = "Terminal blocks" } }, + {113586, new Category { Id = 113586, ParentId = 113584, Name = "PCB terminal blocks" } }, + {113587, new Category { Id = 113587, ParentId = 113584, Name = "Pluggable terminal blocks" } }, + {113588, new Category { Id = 113588, ParentId = 113584, Name = "Quick Splice" } }, + {113589, new Category { Id = 113589, ParentId = 113584, Name = "Terminal blocks - others" } }, + {112990, new Category { Id = 112990, ParentId = 34, Name = "DC power connectors" } }, + {114010, new Category { Id = 114010, ParentId = 34, Name = "AC power connectors" } }, + {113409, new Category { Id = 113409, ParentId = 34, Name = "LED connectors" } }, + {113371, new Category { Id = 113371, ParentId = 34, Name = "Solar connectors" } }, + {100042, new Category { Id = 100042, ParentId = 34, Name = "Rail mounted connectors" } }, + {35, new Category { Id = 35, ParentId = 46, Name = "Audio-video connectors" } }, + {112991, new Category { Id = 112991, ParentId = 35, Name = "XLR & mini XLR connectors" } }, + {100635, new Category { Id = 100635, ParentId = 112991, Name = "XLR connectors" } }, + {112992, new Category { Id = 112992, ParentId = 112991, Name = "Mini XLR connectors" } }, + {100374, new Category { Id = 100374, ParentId = 35, Name = "Jack connectors" } }, + {100375, new Category { Id = 100375, ParentId = 35, Name = "RCA connectors" } }, + {112993, new Category { Id = 112993, ParentId = 35, Name = "DIN & mini DIN connectors" } }, + {100377, new Category { Id = 100377, ParentId = 112993, Name = "DIN connectors" } }, + {112994, new Category { Id = 112994, ParentId = 112993, Name = "Mini DIN connectors" } }, + {100376, new Category { Id = 100376, ParentId = 35, Name = "Loudspeaker connectors" } }, + {100378, new Category { Id = 100378, ParentId = 35, Name = "Microphone connectors" } }, + {100380, new Category { Id = 100380, ParentId = 35, Name = "EURO, HDMI connectors" } }, + {100383, new Category { Id = 100383, ParentId = 35, Name = "AV adapters" } }, + {100467, new Category { Id = 100467, ParentId = 46, Name = "Push-on connectors and cable terminals" } }, + {112995, new Category { Id = 112995, ParentId = 100467, Name = "Insulated terminals" } }, + {100492, new Category { Id = 100492, ParentId = 100467, Name = "Non-insulated terminals" } }, + {100041, new Category { Id = 100041, ParentId = 100467, Name = "Bootlace ferrule and butt splice" } }, + {112996, new Category { Id = 112996, ParentId = 100467, Name = "Solder terminals PCB mount" } }, + {100184, new Category { Id = 100184, ParentId = 46, Name = "Other connectors" } }, + {113744, new Category { Id = 113744, ParentId = 46, Name = "Other connectors TE" } }, + {113975, new Category { Id = 113975, ParentId = 46, Name = "Other connectors Harting" } }, + {113760, new Category { Id = 113760, ParentId = 46, Name = "Other connectors Molex" } }, + {118095, new Category { Id = 118095, ParentId = 46, Name = "Other Amphenol Connectors" } }, + {118102, new Category { Id = 118102, ParentId = 46, Name = "Other Neutrik Connectors" } }, + {118155, new Category { Id = 118155, ParentId = 46, Name = "Other Hirose Connectors" } }, + {118164, new Category { Id = 118164, ParentId = 46, Name = "Other Binder Connectors" } }, + {42, new Category { Id = 42, ParentId = 111000, Name = "Fuses and Circuit Breakers" } }, + {100131, new Category { Id = 100131, ParentId = 42, Name = "SMD Fuses" } }, + {113149, new Category { Id = 113149, ParentId = 100131, Name = "0402 SMD Fuses" } }, + {113150, new Category { Id = 113150, ParentId = 113149, Name = "0402 SMD Fuses - Ultra Fast" } }, + {112997, new Category { Id = 112997, ParentId = 100131, Name = "0603 SMD Fuses" } }, + {112998, new Category { Id = 112998, ParentId = 112997, Name = "0603 SMD Fuses - Ultra Fast" } }, + {112999, new Category { Id = 112999, ParentId = 100131, Name = "0805 SMD Fuses" } }, + {113000, new Category { Id = 113000, ParentId = 112999, Name = "0805 SMD Fuses - Ultra Fast" } }, + {113001, new Category { Id = 113001, ParentId = 100131, Name = "1206 SMD Fuses" } }, + {113151, new Category { Id = 113151, ParentId = 113001, Name = "1206 SMD Fuses - Fast" } }, + {113152, new Category { Id = 113152, ParentId = 113001, Name = "1206 SMD Fuses - Time-Lag" } }, + {113002, new Category { Id = 113002, ParentId = 113001, Name = "1206 SMD Fuses - Ultra Fast" } }, + {113003, new Category { Id = 113003, ParentId = 100131, Name = "2410 SMD Fuses" } }, + {113004, new Category { Id = 113004, ParentId = 113003, Name = "2410 SMD Fuses - Fast" } }, + {113005, new Category { Id = 113005, ParentId = 113003, Name = "2410 SMD Fuses - Time-Lag" } }, + {113135, new Category { Id = 113135, ParentId = 113003, Name = "SMD Fuses 2410 - Ultra Fast" } }, + {113153, new Category { Id = 113153, ParentId = 100131, Name = "MGA SMD Fuses" } }, + {113154, new Category { Id = 113154, ParentId = 113153, Name = "MGA SMD Fuses - Ultra Fast" } }, + {113006, new Category { Id = 113006, ParentId = 100131, Name = "OM SMD Fuses" } }, + {113155, new Category { Id = 113155, ParentId = 113006, Name = "OMF SMD Fuses - Fast" } }, + {113156, new Category { Id = 113156, ParentId = 113006, Name = "OMT SMD Fuses - Time-Lag" } }, + {113008, new Category { Id = 113008, ParentId = 100131, Name = "UM SMD Fuses" } }, + {113170, new Category { Id = 113170, ParentId = 113008, Name = "UMF SMD Fuses - Fast" } }, + {113009, new Category { Id = 113009, ParentId = 113008, Name = "UMT SMD Fuses - Time-Lag" } }, + {113157, new Category { Id = 113157, ParentId = 113008, Name = "UMZ SMD Fuses - Time-Lag" } }, + {113158, new Category { Id = 113158, ParentId = 100131, Name = "5x20mm SMD Fuses" } }, + {113159, new Category { Id = 113159, ParentId = 113158, Name = "5x20mm SMD Fuses - Time-Lag" } }, + {113010, new Category { Id = 113010, ParentId = 100131, Name = "SMD Fuses 8x4,5x4,5mm" } }, + {113011, new Category { Id = 113011, ParentId = 113010, Name = "SMD Fuses 8x4,5x4,5mm - Time-Lag" } }, + {113137, new Category { Id = 113137, ParentId = 100131, Name = "PICO SMD Fuses" } }, + {113138, new Category { Id = 113138, ParentId = 113137, Name = "PICO SMD Fuses - Time-Lag" } }, + {113139, new Category { Id = 113139, ParentId = 113137, Name = "PICO SMD Fuses - Ultra Fast" } }, + {113012, new Category { Id = 113012, ParentId = 100131, Name = "SMD Fuses with Holder" } }, + {113013, new Category { Id = 113013, ParentId = 113012, Name = "SMD Fuses with Holder - Ultra Fast" } }, + {113014, new Category { Id = 113014, ParentId = 113012, Name = "SMD Fuses with Holder - Fast" } }, + {113015, new Category { Id = 113015, ParentId = 113012, Name = "SMD Fuses with Holder - Time Lag" } }, + {113016, new Category { Id = 113016, ParentId = 100131, Name = "SMD Fuses - Others" } }, + {113288, new Category { Id = 113288, ParentId = 42, Name = "Miniature Fuses" } }, + {113289, new Category { Id = 113289, ParentId = 113288, Name = "Fuses 5x15mm" } }, + {113290, new Category { Id = 113290, ParentId = 113289, Name = "Fuses 5x15mm - Fast" } }, + {113291, new Category { Id = 113291, ParentId = 113289, Name = "Fuses 5x15mm - Time-Lag" } }, + {113292, new Category { Id = 113292, ParentId = 113288, Name = "Fuses 5x20mm" } }, + {113293, new Category { Id = 113293, ParentId = 113292, Name = "Fuses 5x20mm - Fast" } }, + {113294, new Category { Id = 113294, ParentId = 113292, Name = "Fuses 5x20mm - Time-Lag" } }, + {113295, new Category { Id = 113295, ParentId = 113292, Name = "Fuses 5x20mm - Medium Time-Lag" } }, + {113296, new Category { Id = 113296, ParentId = 113292, Name = "Fuses 5x20mm - Super Fast" } }, + {113297, new Category { Id = 113297, ParentId = 113288, Name = "Fuses 5x25mm" } }, + {113298, new Category { Id = 113298, ParentId = 113297, Name = "Fuses 5x25mm - Fast" } }, + {113299, new Category { Id = 113299, ParentId = 113297, Name = "Fuses 5x25mm - Medium Time-Lag" } }, + {113300, new Category { Id = 113300, ParentId = 113288, Name = "Fuses 6,3x32mm" } }, + {113301, new Category { Id = 113301, ParentId = 113300, Name = "Fuses 6,3x32mm - Fast" } }, + {113302, new Category { Id = 113302, ParentId = 113300, Name = "Fuses 6,3x32mm - Time-Lag" } }, + {113303, new Category { Id = 113303, ParentId = 113300, Name = "Fuses 6,3x32mm - Super Fast" } }, + {113304, new Category { Id = 113304, ParentId = 113288, Name = "Axial Fuses" } }, + {113305, new Category { Id = 113305, ParentId = 113304, Name = "Axial Fuses - Fast" } }, + {113306, new Category { Id = 113306, ParentId = 113304, Name = "Axial Fuses - Time-Lag" } }, + {113307, new Category { Id = 113307, ParentId = 113304, Name = "Axial Fuses - Super Fast" } }, + {113308, new Category { Id = 113308, ParentId = 113288, Name = "Fuses TR5" } }, + {113309, new Category { Id = 113309, ParentId = 113308, Name = "Fuses TR5 - Fast" } }, + {113310, new Category { Id = 113310, ParentId = 113308, Name = "Fuses TR5 - Time-Lag" } }, + {113311, new Category { Id = 113311, ParentId = 113288, Name = "Fuses TE5" } }, + {113312, new Category { Id = 113312, ParentId = 113288, Name = "Other Miniature Fuses" } }, + {113034, new Category { Id = 113034, ParentId = 42, Name = "Polymer PTC Fuses" } }, + {113035, new Category { Id = 113035, ParentId = 113034, Name = "SMD Polymer Fuses" } }, + {100132, new Category { Id = 100132, ParentId = 113034, Name = "THT Polymer Fuses" } }, + {100089, new Category { Id = 100089, ParentId = 42, Name = "Thermal Fuses" } }, + {100198, new Category { Id = 100198, ParentId = 42, Name = "Automotive Fuses" } }, + {113036, new Category { Id = 113036, ParentId = 100198, Name = "Standard Automotive Fuses" } }, + {113037, new Category { Id = 113037, ParentId = 100198, Name = "Miniature Automotive Fuses" } }, + {113038, new Category { Id = 113038, ParentId = 100198, Name = "Car Fuses - Maxi" } }, + {113136, new Category { Id = 113136, ParentId = 100198, Name = "Other Car Fuses" } }, + {113239, new Category { Id = 113239, ParentId = 100198, Name = "Automotive fuses - Accessories" } }, + {113213, new Category { Id = 113213, ParentId = 42, Name = "Industrial Fuses" } }, + {113313, new Category { Id = 113313, ParentId = 113213, Name = "Fuses 8x31mm" } }, + {113314, new Category { Id = 113314, ParentId = 113213, Name = "Fuses 10,3x38mm" } }, + {113315, new Category { Id = 113315, ParentId = 113314, Name = "Fuses 10,3x38mm - Fast" } }, + {113316, new Category { Id = 113316, ParentId = 113314, Name = "Fuses 10,3x38mm - Time-Lag" } }, + {113317, new Category { Id = 113317, ParentId = 113314, Name = "Fuses 10,3x38mm - Super Fast" } }, + {113318, new Category { Id = 113318, ParentId = 113213, Name = "Fuses 14x51mm" } }, + {113319, new Category { Id = 113319, ParentId = 113213, Name = "Fuses 22x58mm" } }, + {113214, new Category { Id = 113214, ParentId = 113213, Name = "NH Fuses" } }, + {114011, new Category { Id = 114011, ParentId = 113213, Name = "D Fuses" } }, + {113215, new Category { Id = 113215, ParentId = 113213, Name = "High/Medium Voltage Fuses" } }, + {113216, new Category { Id = 113216, ParentId = 113213, Name = "Other Fuses" } }, + {113141, new Category { Id = 113141, ParentId = 42, Name = "Special Applications Fuses" } }, + {113039, new Category { Id = 113039, ParentId = 42, Name = "Fuses - Sets" } }, + {100088, new Category { Id = 100088, ParentId = 42, Name = "Fuseholders" } }, + {113040, new Category { Id = 113040, ParentId = 100088, Name = "Panel Mount Fuseholders" } }, + {113041, new Category { Id = 113041, ParentId = 100088, Name = "PCB Fuseholders" } }, + {113042, new Category { Id = 113042, ParentId = 100088, Name = "Fuseholders for Cable" } }, + {113043, new Category { Id = 113043, ParentId = 100088, Name = "DIN Rail Sockets" } }, + {113593, new Category { Id = 113593, ParentId = 100088, Name = "Car Fuseholders" } }, + {113320, new Category { Id = 113320, ParentId = 42, Name = "PTC Thermistors" } }, + {113044, new Category { Id = 113044, ParentId = 42, Name = "Circuit Breakers" } }, + {113642, new Category { Id = 113642, ParentId = 113643, Name = "Socket Strips" } }, + {100418, new Category { Id = 100418, ParentId = 113044, Name = "Circuit Breakers" } }, + {113045, new Category { Id = 113045, ParentId = 113044, Name = "RCD Circuit Breakers" } }, + {100413, new Category { Id = 100413, ParentId = 113044, Name = "Motor Protection Breakers" } }, + {113518, new Category { Id = 113518, ParentId = 113044, Name = "Earth Leakage Relays" } }, + {113046, new Category { Id = 113046, ParentId = 113044, Name = "Surge Arresters" } }, + {113047, new Category { Id = 113047, ParentId = 113044, Name = "Disconnectors" } }, + {113264, new Category { Id = 113264, ParentId = 113044, Name = "Installation accessories" } }, + {100232, new Category { Id = 100232, ParentId = 111000, Name = "Switches and Indicators" } }, + {100060, new Category { Id = 100060, ParentId = 100232, Name = "Microswitches" } }, + {113048, new Category { Id = 113048, ParentId = 100060, Name = "Microswitches TACT" } }, + {113049, new Category { Id = 113049, ParentId = 100060, Name = "Microswitches SNAP ACTION" } }, + {100128, new Category { Id = 100128, ParentId = 100232, Name = "Panel Mount Switches" } }, + {113050, new Category { Id = 113050, ParentId = 100128, Name = "Panel Mount Switches, Standard 16mm" } }, + {113051, new Category { Id = 113051, ParentId = 100128, Name = "Panel Mount Switches, Standard 22mm" } }, + {113052, new Category { Id = 113052, ParentId = 100128, Name = "Panel Mount Switches, Standard 30mm" } }, + {113758, new Category { Id = 113758, ParentId = 100128, Name = "Panel Mount Accessories" } }, + {113686, new Category { Id = 113686, ParentId = 100232, Name = "Control Stations" } }, + {100054, new Category { Id = 100054, ParentId = 100232, Name = "Rocker Switches" } }, + {100058, new Category { Id = 100058, ParentId = 100232, Name = "Dip-Switches" } }, + {100057, new Category { Id = 100057, ParentId = 100232, Name = "Slide Switches" } }, + {113053, new Category { Id = 113053, ParentId = 100232, Name = "Rotary Switches" } }, + {100056, new Category { Id = 100056, ParentId = 100232, Name = "Toggle Switches" } }, + {100055, new Category { Id = 100055, ParentId = 100232, Name = "Push Button Switches" } }, + {113675, new Category { Id = 113675, ParentId = 100055, Name = "Standard Switches" } }, + {113676, new Category { Id = 113676, ParentId = 100055, Name = "Keypad Switches" } }, + {113677, new Category { Id = 113677, ParentId = 100055, Name = "Door Switches" } }, + {113678, new Category { Id = 113678, ParentId = 100055, Name = "Push-Pull Switches" } }, + {113679, new Category { Id = 113679, ParentId = 100055, Name = "Detect Switches" } }, + {113054, new Category { Id = 113054, ParentId = 100232, Name = "Vandal Resistant Switches" } }, + {113674, new Category { Id = 113674, ParentId = 113054, Name = "Push Button Switches" } }, + {113680, new Category { Id = 113680, ParentId = 113054, Name = "Piezoelectric Switches" } }, + {113756, new Category { Id = 113756, ParentId = 113054, Name = "Capacitive switches" } }, + {113055, new Category { Id = 113055, ParentId = 100232, Name = "Cam Switches" } }, + {100233, new Category { Id = 100233, ParentId = 100232, Name = "Foot Switches" } }, + {100493, new Category { Id = 100493, ParentId = 100232, Name = "Joysticks" } }, + {100062, new Category { Id = 100062, ParentId = 100232, Name = "Key Switches and Locks" } }, + {100234, new Category { Id = 100234, ParentId = 100232, Name = "Keypads" } }, + {113681, new Category { Id = 113681, ParentId = 100234, Name = "Metal Keypads" } }, + {113682, new Category { Id = 113682, ParentId = 100234, Name = "Plastic Keypads" } }, + {113683, new Category { Id = 113683, ParentId = 100234, Name = "Membrane Keypads" } }, + {100059, new Category { Id = 100059, ParentId = 100232, Name = "Encoding Switches" } }, + {93, new Category { Id = 93, ParentId = 100232, Name = "Indicators" } }, + {100325, new Category { Id = 100325, ParentId = 93, Name = "LED Panel Mount Indicators" } }, + {112494, new Category { Id = 112494, ParentId = 93, Name = "Neon Indicators" } }, + {113753, new Category { Id = 113753, ParentId = 100232, Name = "Switches and Indicators - other" } }, + {63, new Category { Id = 63, ParentId = 111000, Name = "Sound Sources" } }, + {100207, new Category { Id = 100207, ParentId = 63, Name = "Speakers" } }, + {100225, new Category { Id = 100225, ParentId = 63, Name = "Microphones and Headsets" } }, + {100208, new Category { Id = 100208, ParentId = 63, Name = "Sounders" } }, + {112496, new Category { Id = 112496, ParentId = 100208, Name = "Electromagnetic Sounders" } }, + {112497, new Category { Id = 112497, ParentId = 112496, Name = "Electromagnetic Sounders with Generator" } }, + {112498, new Category { Id = 112498, ParentId = 112496, Name = "Electromagnetic Sounders w/o Generator" } }, + {112499, new Category { Id = 112499, ParentId = 100208, Name = "Piezoelectric signallers" } }, + {112500, new Category { Id = 112500, ParentId = 112499, Name = "Piezo Transducers with Generator" } }, + {112501, new Category { Id = 112501, ParentId = 112499, Name = "Piezo Transducers without Generator" } }, + {113633, new Category { Id = 113633, ParentId = 100208, Name = "Panel Sound Signalling Devices" } }, + {112502, new Category { Id = 112502, ParentId = 111000, Name = "Relays and Contactors" } }, + {40, new Category { Id = 40, ParentId = 112502, Name = "Relays" } }, + {100593, new Category { Id = 100593, ParentId = 40, Name = "Electromagnetic Relays" } }, + {112503, new Category { Id = 112503, ParentId = 100593, Name = "Reed Electromagnetic Relays" } }, + {112504, new Category { Id = 112504, ParentId = 100593, Name = "Miniature Electromagnetic Relays" } }, + {100051, new Category { Id = 100051, ParentId = 100593, Name = "Industrial Electromagnetic Relays" } }, + {112505, new Category { Id = 112505, ParentId = 100593, Name = "Power Electromagnetic Relays" } }, + {112506, new Category { Id = 112506, ParentId = 100593, Name = "Automotive Electromagnetic Relays" } }, + {112507, new Category { Id = 112507, ParentId = 100593, Name = "Electromagnetic Relays - Sets" } }, + {112508, new Category { Id = 112508, ParentId = 100593, Name = "Electromagnetic Relays - Accessories" } }, + {112509, new Category { Id = 112509, ParentId = 40, Name = "Solid State Relays" } }, + {100052, new Category { Id = 100052, ParentId = 112509, Name = "One Phase Solid State Relays" } }, + {112510, new Category { Id = 112510, ParentId = 112509, Name = "Three Phase Solid State Relays" } }, + {112511, new Category { Id = 112511, ParentId = 112509, Name = "DC Solid State Relays" } }, + {113134, new Category { Id = 113134, ParentId = 40, Name = "Installation Relays" } }, + {100423, new Category { Id = 100423, ParentId = 112502, Name = "Contactors" } }, + {112512, new Category { Id = 112512, ParentId = 100423, Name = "Contactors - Main modules" } }, + {112513, new Category { Id = 112513, ParentId = 100423, Name = "Contactors - Accessories" } }, + {118116, new Category { Id = 118116, ParentId = 100423, Name = "Contactors -Installation Modular" } }, + {100440, new Category { Id = 100440, ParentId = 111000, Name = "Transformers and Ferrite Cores" } }, + {112514, new Category { Id = 112514, ParentId = 100440, Name = "PCB transformers" } }, + {100531, new Category { Id = 100531, ParentId = 100440, Name = "Transformers with Fastening" } }, + {100028, new Category { Id = 100028, ParentId = 100440, Name = "Toroidal Transformers" } }, + {112515, new Category { Id = 112515, ParentId = 100440, Name = "Safety Transformers" } }, + {100408, new Category { Id = 100408, ParentId = 100440, Name = "Autotransformers" } }, + {112516, new Category { Id = 112516, ParentId = 100440, Name = "Current Transformers" } }, + {112517, new Category { Id = 112517, ParentId = 100440, Name = "Ferrite Cores" } }, + {112518, new Category { Id = 112518, ParentId = 100440, Name = "Coil formers and accessories" } }, + {41, new Category { Id = 41, ParentId = 111000, Name = "Fans, Cooling and Heating Systems" } }, + {112519, new Category { Id = 112519, ParentId = 41, Name = "AC Fans" } }, + {112520, new Category { Id = 112520, ParentId = 112519, Name = "AC230V Fans" } }, + {112521, new Category { Id = 112521, ParentId = 112519, Name = "AC 230V/115V Fans" } }, + {112522, new Category { Id = 112522, ParentId = 112519, Name = "AC115V Fans" } }, + {113479, new Category { Id = 113479, ParentId = 112519, Name = "AC 400V Fans" } }, + {113480, new Category { Id = 113480, ParentId = 112519, Name = "AC 230V/400V Fans" } }, + {100091, new Category { Id = 100091, ParentId = 41, Name = "DC Fans" } }, + {113203, new Category { Id = 113203, ParentId = 100091, Name = "Miniature Fans" } }, + {112523, new Category { Id = 112523, ParentId = 100091, Name = "DC5V Fans" } }, + {112524, new Category { Id = 112524, ParentId = 100091, Name = "DC12V Fans" } }, + {112525, new Category { Id = 112525, ParentId = 100091, Name = "DC24V Fans" } }, + {112526, new Category { Id = 112526, ParentId = 100091, Name = "DC48V Fans" } }, + {113467, new Category { Id = 113467, ParentId = 41, Name = "EC Fans" } }, + {113205, new Category { Id = 113205, ParentId = 41, Name = "Fans Accessories" } }, + {113206, new Category { Id = 113206, ParentId = 113205, Name = "Guards" } }, + {113207, new Category { Id = 113207, ParentId = 113205, Name = "Filters and Inserts" } }, + {113208, new Category { Id = 113208, ParentId = 113205, Name = "Power Cables" } }, + {113209, new Category { Id = 113209, ParentId = 113205, Name = "Mounting Elements" } }, + {100092, new Category { Id = 100092, ParentId = 41, Name = "Fan Controls" } }, + {113248, new Category { Id = 113248, ParentId = 100092, Name = "Controllers" } }, + {113249, new Category { Id = 113249, ParentId = 100092, Name = "Accesories for Controllers" } }, + {113666, new Category { Id = 113666, ParentId = 112596, Name = "AC Motor Controllers" } }, + {100093, new Category { Id = 100093, ParentId = 41, Name = "Heating Mats" } }, + {100094, new Category { Id = 100094, ParentId = 41, Name = "Temperature Indicators" } }, + {100694, new Category { Id = 100694, ParentId = 41, Name = "Heating Elements" } }, + {113278, new Category { Id = 113278, ParentId = 41, Name = "Air Conditioners" } }, + {113279, new Category { Id = 113279, ParentId = 41, Name = "Heat Exchangers" } }, + {113415, new Category { Id = 113415, ParentId = 41, Name = "LED Cooling" } }, + {113176, new Category { Id = 113176, ParentId = 100693, Name = "Heatsinks for LED" } }, + {113414, new Category { Id = 113414, ParentId = 113415, Name = "Cooling Modules" } }, + {113471, new Category { Id = 113471, ParentId = 41, Name = "Ventilation Systems for Cabinets" } }, + {113472, new Category { Id = 113472, ParentId = 113471, Name = "AC Fans" } }, + {113473, new Category { Id = 113473, ParentId = 113471, Name = "DC Fans" } }, + {113474, new Category { Id = 113474, ParentId = 113471, Name = "Guards" } }, + {113475, new Category { Id = 113475, ParentId = 113471, Name = "Cabinets Accessories" } }, + {118299, new Category { Id = 118299, ParentId = 41, Name = "Ventilation Systems for Buildings" } }, + {113531, new Category { Id = 113531, ParentId = 41, Name = "Fan Motors" } }, + {113532, new Category { Id = 113532, ParentId = 113531, Name = "AC Motors" } }, + {113533, new Category { Id = 113533, ParentId = 113531, Name = "EC Motors" } }, + {113534, new Category { Id = 113534, ParentId = 113531, Name = "Fan Impellers" } }, + {113535, new Category { Id = 113535, ParentId = 113531, Name = "Fan Motors Accessories" } }, + {112888, new Category { Id = 112888, ParentId = 21, Name = "Peltier modules" } }, + {67, new Category { Id = 67, ParentId = 111000, Name = "Power Sources" } }, + {100199, new Category { Id = 100199, ParentId = 67, Name = "Batteries, Rechargeable Batteries" } }, + {100346, new Category { Id = 100346, ParentId = 100199, Name = "Batteries" } }, + {100076, new Category { Id = 100076, ParentId = 100199, Name = "Rechargeable Batteries" } }, + {100247, new Category { Id = 100247, ParentId = 100199, Name = "Acid Cells" } }, + {100077, new Category { Id = 100077, ParentId = 100199, Name = "Batteries - Containers and Holders" } }, + {100647, new Category { Id = 100647, ParentId = 67, Name = "Chargers" } }, + {112530, new Category { Id = 112530, ParentId = 67, Name = "Power Supplies" } }, + {113646, new Category { Id = 113646, ParentId = 113643, Name = "Computer Power Supply Units and UPSs" } }, + {113655, new Category { Id = 113655, ParentId = 112530, Name = "Open Frame Power Supplies" } }, + {113656, new Category { Id = 113656, ParentId = 112530, Name = "Built-in Power Supplies" } }, + {113652, new Category { Id = 113652, ParentId = 112530, Name = "Din Rail Mounting Power Supplies" } }, + {113653, new Category { Id = 113653, ParentId = 112530, Name = "LED Power Supplies" } }, + {113628, new Category { Id = 113628, ParentId = 112530, Name = "Plug-in Power Supplies" } }, + {113629, new Category { Id = 113629, ParentId = 112530, Name = "Desktop Power Supplies" } }, + {113630, new Category { Id = 113630, ParentId = 112530, Name = "Laptop Power Supplies" } }, + {118094, new Category { Id = 118094, ParentId = 112530, Name = "PoE Power Supplies" } }, + {100646, new Category { Id = 100646, ParentId = 112530, Name = "Car Power Supplies and Converters" } }, + {114014, new Category { Id = 114014, ParentId = 112530, Name = "Power Supplies - Others" } }, + {112532, new Category { Id = 112532, ParentId = 67, Name = "Converters" } }, + {100320, new Category { Id = 100320, ParentId = 112532, Name = "DC/DC Converters" } }, + {100433, new Category { Id = 100433, ParentId = 112532, Name = "PCB AC/DC converters" } }, + {113581, new Category { Id = 113581, ParentId = 67, Name = "Photovoltaic Modules" } }, + {112533, new Category { Id = 112533, ParentId = 111000, Name = "Wires and Cables" } }, + {38, new Category { Id = 38, ParentId = 112533, Name = "Cables" } }, + {112534, new Category { Id = 112534, ParentId = 38, Name = "Single Core Cables" } }, + {112535, new Category { Id = 112535, ParentId = 112534, Name = "Single Core Cable - Solid" } }, + {100147, new Category { Id = 100147, ParentId = 112534, Name = "Single Core Cable - Strand" } }, + {100148, new Category { Id = 100148, ParentId = 38, Name = "Test Leads" } }, + {100555, new Category { Id = 100555, ParentId = 38, Name = "Power Cords" } }, + {113171, new Category { Id = 113171, ParentId = 38, Name = "Data Transmission Cables" } }, + {113172, new Category { Id = 113172, ParentId = 113171, Name = "Telecommunication Cables" } }, + {113173, new Category { Id = 113173, ParentId = 113171, Name = "Industrial Ethernet Cables" } }, + {113174, new Category { Id = 113174, ParentId = 113171, Name = "Serial Bus Cables" } }, + {113175, new Category { Id = 113175, ParentId = 113171, Name = "Building Automation Bus Cables" } }, + {113740, new Category { Id = 113740, ParentId = 113171, Name = "Optical Fiber Cables" } }, + {100574, new Category { Id = 100574, ParentId = 38, Name = "Multicore Cables" } }, + {100156, new Category { Id = 100156, ParentId = 100574, Name = "Multicore Cables - Shielded" } }, + {100152, new Category { Id = 100152, ParentId = 100574, Name = "Multicore Cables - Unshielded" } }, + {113604, new Category { Id = 113604, ParentId = 38, Name = "Cables for Power Chains" } }, + {113605, new Category { Id = 113605, ParentId = 113604, Name = "Cables for Power Chains - Shielded" } }, + {113606, new Category { Id = 113606, ParentId = 113604, Name = "Cables for Power Chains - Unshielded" } }, + {112538, new Category { Id = 112538, ParentId = 38, Name = "Silicone Cables" } }, + {100566, new Category { Id = 100566, ParentId = 112538, Name = "Silicone Cables - Single Core" } }, + {100567, new Category { Id = 100567, ParentId = 112538, Name = "Silicone Cables - Multicore" } }, + {100565, new Category { Id = 100565, ParentId = 38, Name = "Heat resistant cables" } }, + {118166, new Category { Id = 118166, ParentId = 38, Name = "Fire Performance Cables" } }, + {100596, new Category { Id = 100596, ParentId = 38, Name = "Car Instalation Cables" } }, + {100157, new Category { Id = 100157, ParentId = 38, Name = "Coaxial Cables" } }, + {113334, new Category { Id = 113334, ParentId = 38, Name = "Audio-Video Cables" } }, + {113335, new Category { Id = 113335, ParentId = 113334, Name = "Video Cables" } }, + {113336, new Category { Id = 113336, ParentId = 113334, Name = "Speaker Cables" } }, + {113337, new Category { Id = 113337, ParentId = 113334, Name = "Microphone Cables" } }, + {113338, new Category { Id = 113338, ParentId = 113334, Name = "Headphone Cables" } }, + {113339, new Category { Id = 113339, ParentId = 113334, Name = "Cables for LED and DMX Installations" } }, + {112539, new Category { Id = 112539, ParentId = 38, Name = "Ribbon Cables" } }, + {113262, new Category { Id = 113262, ParentId = 100687, Name = "Ribbon Cables with IDC Connectors" } }, + {100151, new Category { Id = 100151, ParentId = 112539, Name = "Ribbon Cables - Single Color" } }, + {100564, new Category { Id = 100564, ParentId = 112539, Name = "Ribbon Cables - Multicolor" } }, + {100149, new Category { Id = 100149, ParentId = 38, Name = "Telephone Cables" } }, + {100146, new Category { Id = 100146, ParentId = 38, Name = "Spiral Cables" } }, + {100610, new Category { Id = 100610, ParentId = 38, Name = "Coil Wires" } }, + {113597, new Category { Id = 113597, ParentId = 38, Name = "Resistance Wires" } }, + {100571, new Category { Id = 100571, ParentId = 38, Name = "Silver Plated Wires" } }, + {100575, new Category { Id = 100575, ParentId = 38, Name = "Copper Braids" } }, + {112540, new Category { Id = 112540, ParentId = 38, Name = "Cables - Others" } }, + {100687, new Category { Id = 100687, ParentId = 112533, Name = "Cable Assemblies" } }, + {100685, new Category { Id = 100685, ParentId = 100687, Name = "HDMI, DVI, DisplayPort cables and adapt." } }, + {112541, new Category { Id = 112541, ParentId = 100687, Name = "USB cables and adapters" } }, + {100688, new Category { Id = 100688, ParentId = 100687, Name = "RJ45 Cables" } }, + {113341, new Category { Id = 113341, ParentId = 100687, Name = "Fibre Optic Patchcords and Pigtails" } }, + {100328, new Category { Id = 100328, ParentId = 100687, Name = "Audio - Video Cables" } }, + {100382, new Category { Id = 100382, ParentId = 100687, Name = "Computer cables and adapters" } }, + {113262, new Category { Id = 113262, ParentId = 100687, Name = "Ribbon Cables with IDC Connectors" } }, + {100329, new Category { Id = 100329, ParentId = 100687, Name = "Power Supply Cords" } }, + {113200, new Category { Id = 113200, ParentId = 100329, Name = "Universal and Computer Power Cords" } }, + {113201, new Category { Id = 113201, ParentId = 100329, Name = "Extension Power Cords" } }, + {113235, new Category { Id = 113235, ParentId = 100329, Name = "DC Power Cords" } }, + {118135, new Category { Id = 118135, ParentId = 100329, Name = "Cables for Electric Cars" } }, + {100686, new Category { Id = 100686, ParentId = 100687, Name = "Monitor cables and adapters" } }, + {100331, new Category { Id = 100331, ParentId = 100687, Name = "Coaxial Assemblies" } }, + {100330, new Category { Id = 100330, ParentId = 100687, Name = "Telephone Cables Assemblies" } }, + {118156, new Category { Id = 118156, ParentId = 100687, Name = "Wire-To-Board Cable Assemblies" } }, + {112583, new Category { Id = 112583, ParentId = 100249, Name = "Sensors - Cables" } }, + {118300, new Category { Id = 118300, ParentId = 112596, Name = "Servo cables" } }, + {100072, new Category { Id = 100072, ParentId = 112533, Name = "Conduits and Insulating Sleeves" } }, + {113544, new Category { Id = 113544, ParentId = 100072, Name = "Wiring ducts" } }, + {113545, new Category { Id = 113545, ParentId = 100072, Name = "Polyester conduits" } }, + {113546, new Category { Id = 113546, ParentId = 100072, Name = "Electro Insulation tubes" } }, + {113547, new Category { Id = 113547, ParentId = 100072, Name = "Protective tubes" } }, + {113548, new Category { Id = 113548, ParentId = 100072, Name = "Conduits accessories" } }, + {39, new Category { Id = 39, ParentId = 112533, Name = "Cables - Accessories" } }, + {112542, new Category { Id = 112542, ParentId = 39, Name = "Cable Ties and Holders" } }, + {100068, new Category { Id = 100068, ParentId = 112542, Name = "Cable Ties" } }, + {113751, new Category { Id = 113751, ParentId = 112542, Name = "Cable Ties – Metal" } }, + {112543, new Category { Id = 112543, ParentId = 112542, Name = "Cable Ties - Holders" } }, + {100069, new Category { Id = 100069, ParentId = 39, Name = "Cable Holders" } }, + {113685, new Category { Id = 113685, ParentId = 39, Name = "Worm Gear Clamps and Fixing Clamps" } }, + {100073, new Category { Id = 100073, ParentId = 39, Name = "Wire Markers" } }, + {112544, new Category { Id = 112544, ParentId = 39, Name = "Glands and Grommets" } }, + {100071, new Category { Id = 100071, ParentId = 112544, Name = "Glands" } }, + {118103, new Category { Id = 118103, ParentId = 112544, Name = "Inserts for Glands" } }, + {113164, new Category { Id = 113164, ParentId = 112544, Name = "Reduction of Threads for Glands" } }, + {113165, new Category { Id = 113165, ParentId = 112544, Name = "Nuts for Glands" } }, + {118104, new Category { Id = 118104, ParentId = 112544, Name = "Stoppers" } }, + {112545, new Category { Id = 112545, ParentId = 112544, Name = "Grommets" } }, + {100337, new Category { Id = 100337, ParentId = 39, Name = "Cable Chains" } }, + {113687, new Category { Id = 113687, ParentId = 39, Name = "Gel Cable Joints" } }, + {113255, new Category { Id = 113255, ParentId = 112533, Name = "Heat Shrink Tubes" } }, + {100336, new Category { Id = 100336, ParentId = 111000, Name = "Mechanical" } }, + {100316, new Category { Id = 100316, ParentId = 100336, Name = "Bolts" } }, + {113391, new Category { Id = 113391, ParentId = 100336, Name = "Shoulder Screws" } }, + {100616, new Category { Id = 100616, ParentId = 100336, Name = "Screws" } }, + {100317, new Category { Id = 100317, ParentId = 100336, Name = "Nuts" } }, + {112546, new Category { Id = 112546, ParentId = 100336, Name = "Threaded Insertions" } }, + {100318, new Category { Id = 100318, ParentId = 100336, Name = "Washers" } }, + {100617, new Category { Id = 100617, ParentId = 100336, Name = "Rivets" } }, + {113673, new Category { Id = 113673, ParentId = 100336, Name = "Fittings for ropes" } }, + {100618, new Category { Id = 100618, ParentId = 100336, Name = "Safety Elements" } }, + {113256, new Category { Id = 113256, ParentId = 100618, Name = "Circlips for shafts" } }, + {113257, new Category { Id = 113257, ParentId = 100618, Name = "Safety pins" } }, + {113258, new Category { Id = 113258, ParentId = 100618, Name = "Parallel keys" } }, + {113259, new Category { Id = 113259, ParentId = 100618, Name = "Indexing plungers" } }, + {113271, new Category { Id = 113271, ParentId = 100618, Name = "Side Thrust Pins" } }, + {113331, new Category { Id = 113331, ParentId = 100618, Name = "Locking pins" } }, + {113743, new Category { Id = 113743, ParentId = 100336, Name = "Car Fasteners" } }, + {100335, new Category { Id = 100335, ParentId = 100336, Name = "Metal Spacers" } }, + {100334, new Category { Id = 100334, ParentId = 100336, Name = "Plastic Spacers" } }, + {112547, new Category { Id = 112547, ParentId = 100334, Name = "Plastic Standoffs" } }, + {112548, new Category { Id = 112548, ParentId = 100334, Name = "Plastic Pegs" } }, + {118183, new Category { Id = 118183, ParentId = 100334, Name = "Insulating Spacer Sleeves" } }, + {112549, new Category { Id = 112549, ParentId = 100336, Name = "Joints" } }, + {100474, new Category { Id = 100474, ParentId = 100336, Name = "PCB Brackets and Guides" } }, + {113565, new Category { Id = 113565, ParentId = 100336, Name = "Handwheels and pointers" } }, + {113166, new Category { Id = 113166, ParentId = 100336, Name = "Knobs" } }, + {113272, new Category { Id = 113272, ParentId = 100336, Name = "Accessories for Hydraulic Systems" } }, + {113273, new Category { Id = 113273, ParentId = 113272, Name = "Breather Caps and Plugs" } }, + {113274, new Category { Id = 113274, ParentId = 113272, Name = "Level Indicators" } }, + {118141, new Category { Id = 118141, ParentId = 113272, Name = "Connection Fittings" } }, + {113167, new Category { Id = 113167, ParentId = 100336, Name = "Clamping Levers" } }, + {113231, new Category { Id = 113231, ParentId = 100336, Name = "Locks and Clasps" } }, + {113392, new Category { Id = 113392, ParentId = 113231, Name = "Latches" } }, + {113393, new Category { Id = 113393, ParentId = 113231, Name = "Clasps and Latches" } }, + {113394, new Category { Id = 113394, ParentId = 113231, Name = "Electromagnetic Locks" } }, + {113168, new Category { Id = 113168, ParentId = 100336, Name = "Hinges" } }, + {113238, new Category { Id = 113238, ParentId = 100336, Name = "Caps Plugs and Masking" } }, + {113169, new Category { Id = 113169, ParentId = 100336, Name = "Feet and Wheels" } }, + {113395, new Category { Id = 113395, ParentId = 113169, Name = "Feet" } }, + {113396, new Category { Id = 113396, ParentId = 113169, Name = "Wheels" } }, + {113397, new Category { Id = 113397, ParentId = 113169, Name = "Feet" } }, + {113566, new Category { Id = 113566, ParentId = 113169, Name = "Accesories for feet" } }, + {113232, new Category { Id = 113232, ParentId = 100336, Name = "Profiles and Holders" } }, + {113561, new Category { Id = 113561, ParentId = 113232, Name = "Aluminium Profiles" } }, + {113562, new Category { Id = 113562, ParentId = 113232, Name = "Holders for Sensors" } }, + {113563, new Category { Id = 113563, ParentId = 113232, Name = "Accessories for Profiles" } }, + {112550, new Category { Id = 112550, ParentId = 100336, Name = "Vibration Dampers" } }, + {113476, new Category { Id = 113476, ParentId = 100336, Name = "Bearings" } }, + {113477, new Category { Id = 113477, ParentId = 113476, Name = "Plain Bearings" } }, + {113478, new Category { Id = 113478, ParentId = 113476, Name = "Roller Bearings" } }, + {113347, new Category { Id = 113347, ParentId = 100336, Name = "Profiles for LED" } }, + {113372, new Category { Id = 113372, ParentId = 100336, Name = "Handles" } }, + {113599, new Category { Id = 113599, ParentId = 100336, Name = "Sliding and Transport Systems" } }, + {113745, new Category { Id = 113745, ParentId = 113599, Name = "Linear Guides" } }, + {113746, new Category { Id = 113746, ParentId = 113599, Name = "Transport Systems" } }, + {113322, new Category { Id = 113322, ParentId = 100336, Name = "Technical seals" } }, + {113323, new Category { Id = 113323, ParentId = 113322, Name = "Seals" } }, + {113724, new Category { Id = 113724, ParentId = 100336, Name = "Mechanical Power Transmission" } }, + {113735, new Category { Id = 113735, ParentId = 100336, Name = "Support insulators" } }, + {113736, new Category { Id = 113736, ParentId = 100336, Name = "Engineering materials" } }, + {113737, new Category { Id = 113737, ParentId = 113736, Name = "Plastic rods" } }, + {113738, new Category { Id = 113738, ParentId = 113736, Name = "Plastic sheets" } }, + {113275, new Category { Id = 113275, ParentId = 100336, Name = "Toggle Clamps and Clamping Bolts" } }, + {113685, new Category { Id = 113685, ParentId = 39, Name = "Worm Gear Clamps and Fixing Clamps" } }, + {112555, new Category { Id = 112555, ParentId = 112554, Name = "Edge Protective Covers" } }, + {100480, new Category { Id = 100480, ParentId = 100249, Name = "Magnets" } }, + {100431, new Category { Id = 100431, ParentId = 111000, Name = "Enclosures" } }, + {100241, new Category { Id = 100241, ParentId = 100431, Name = "Multipurpose Enclosures" } }, + {100632, new Category { Id = 100632, ParentId = 100431, Name = "Modular Aparatus Enclosures" } }, + {100240, new Category { Id = 100240, ParentId = 100431, Name = "Remote Control Enclosures" } }, + {113542, new Category { Id = 113542, ParentId = 100431, Name = "Enclosure for Embedded Systems" } }, + {100630, new Category { Id = 100630, ParentId = 100431, Name = "Enclosures for Devices with Display" } }, + {112551, new Category { Id = 112551, ParentId = 100431, Name = "Enclosures for Alarms and Sensors" } }, + {100629, new Category { Id = 100629, ParentId = 100431, Name = "Enclosures for Potting" } }, + {100628, new Category { Id = 100628, ParentId = 100431, Name = "Power Supplies Enclosures" } }, + {100625, new Category { Id = 100625, ParentId = 100431, Name = "Din Rail Mounting Enclosures/Accessories" } }, + {113590, new Category { Id = 113590, ParentId = 100625, Name = "Din Rail Mounting Enclosures" } }, + {113591, new Category { Id = 113591, ParentId = 100625, Name = "Din Rail Mounting Enclosures-Accessories" } }, + {100624, new Category { Id = 100624, ParentId = 100431, Name = "Wall Mounting Enclosures" } }, + {100626, new Category { Id = 100626, ParentId = 100431, Name = "Desktop Enclosures" } }, + {100101, new Category { Id = 100101, ParentId = 100431, Name = "Shielded enclosures" } }, + {100623, new Category { Id = 100623, ParentId = 100431, Name = "Enclosures with Panel" } }, + {100631, new Category { Id = 100631, ParentId = 100431, Name = "19inch Enclosures" } }, + {112552, new Category { Id = 112552, ParentId = 100631, Name = "19inch Enclosures" } }, + {112553, new Category { Id = 112553, ParentId = 100631, Name = "19inch Enclosures - Accessories" } }, + {100242, new Category { Id = 100242, ParentId = 100431, Name = "Panel Mounting Enclosures" } }, + {113522, new Category { Id = 113522, ParentId = 100431, Name = "Junction boxes" } }, + {112554, new Category { Id = 112554, ParentId = 100431, Name = "Enclosures - Accessories" } }, + {113372, new Category { Id = 113372, ParentId = 100336, Name = "Handles" } }, + {113397, new Category { Id = 113397, ParentId = 113169, Name = "Feet" } }, + {112555, new Category { Id = 112555, ParentId = 112554, Name = "Edge Protective Covers" } }, + {114016, new Category { Id = 114016, ParentId = 112554, Name = "Enclosures - Foots" } }, + {112557, new Category { Id = 112557, ParentId = 112554, Name = "Enclosures - Caps" } }, + {112558, new Category { Id = 112558, ParentId = 112554, Name = "Enclosures - Holders" } }, + {118134, new Category { Id = 118134, ParentId = 112554, Name = "Enclosures - Mounting Plates" } }, + {112559, new Category { Id = 112559, ParentId = 112554, Name = "Enclosures - Other Accessories" } }, + {100124, new Category { Id = 100124, ParentId = 111000, Name = "Automation" } }, + {100249, new Category { Id = 100249, ParentId = 100124, Name = "Sensors and Transducers" } }, + {112560, new Category { Id = 112560, ParentId = 100249, Name = "Inductive Sensors" } }, + {112561, new Category { Id = 112561, ParentId = 112560, Name = "Cylindrical Inductive Sensors" } }, + {112562, new Category { Id = 112562, ParentId = 112561, Name = "AC Cylindrical Inductive Sensors" } }, + {100065, new Category { Id = 100065, ParentId = 112561, Name = "DC Cylindrical Inductive Sensors" } }, + {112563, new Category { Id = 112563, ParentId = 112560, Name = "Rectangle Inductive Sensors" } }, + {112564, new Category { Id = 112564, ParentId = 112560, Name = "Inductive Sensors - Accessories" } }, + {112565, new Category { Id = 112565, ParentId = 100249, Name = "Capacitive Sensors" } }, + {112566, new Category { Id = 112566, ParentId = 100249, Name = "Photoelectric Sensors" } }, + {100064, new Category { Id = 100064, ParentId = 112566, Name = "Standard Photoelectric Sensors" } }, + {112567, new Category { Id = 112567, ParentId = 112566, Name = "PCB Photoelectric Sensors" } }, + {112568, new Category { Id = 112568, ParentId = 112566, Name = "Photoelectric Sensors - Reflectors" } }, + {113725, new Category { Id = 113725, ParentId = 112592, Name = "Light Curtains" } }, + {113777, new Category { Id = 113777, ParentId = 100249, Name = "Measurement Sensors" } }, + {112569, new Category { Id = 112569, ParentId = 100249, Name = "Fiber-Optic Sensors" } }, + {112570, new Category { Id = 112570, ParentId = 100249, Name = "Toslink - Transmitters and Receivers" } }, + {112571, new Category { Id = 112571, ParentId = 100249, Name = "Temperature Sensors and Transducers" } }, + {112572, new Category { Id = 112572, ParentId = 112571, Name = "Temperature Sensors - NTC" } }, + {113657, new Category { Id = 113657, ParentId = 112571, Name = "Temperature Sensors - PTC" } }, + {112573, new Category { Id = 112573, ParentId = 112571, Name = "Temp. Sensors - Resistance Thermometers" } }, + {113658, new Category { Id = 113658, ParentId = 112571, Name = "Temperature Sensors - Thermocouples" } }, + {113659, new Category { Id = 113659, ParentId = 112571, Name = "Temperature Sensors - Accessories" } }, + {112574, new Category { Id = 112574, ParentId = 112571, Name = "Temperature Transducers" } }, + {100479, new Category { Id = 100479, ParentId = 100249, Name = "Thermostats" } }, + {112575, new Category { Id = 112575, ParentId = 100249, Name = "Magnetic Sensors" } }, + {100478, new Category { Id = 100478, ParentId = 112575, Name = "Reed Sensors" } }, + {112576, new Category { Id = 112576, ParentId = 112575, Name = "Hall Sensors" } }, + {112577, new Category { Id = 112577, ParentId = 112575, Name = "Resistive Magnetic Sensors" } }, + {100480, new Category { Id = 100480, ParentId = 100249, Name = "Magnets" } }, + {112578, new Category { Id = 112578, ParentId = 100249, Name = "Level Sensors" } }, + {112579, new Category { Id = 112579, ParentId = 100249, Name = "Flow Meters" } }, + {112580, new Category { Id = 112580, ParentId = 100249, Name = "Pressure Sensors and Transducers" } }, + {100524, new Category { Id = 100524, ParentId = 112580, Name = "Pressure Sensors" } }, + {112581, new Category { Id = 112581, ParentId = 112580, Name = "Pressure Transducers" } }, + {100438, new Category { Id = 100438, ParentId = 100249, Name = "Ultrasonic Sensors" } }, + {100439, new Category { Id = 100439, ParentId = 100249, Name = "Pressure Sensors" } }, + {113592, new Category { Id = 113592, ParentId = 100249, Name = "Tilt Sensors" } }, + {100525, new Category { Id = 100525, ParentId = 100249, Name = "Humidity Sensors" } }, + {100526, new Category { Id = 100526, ParentId = 100249, Name = "Gas Sensors" } }, + {112582, new Category { Id = 112582, ParentId = 100249, Name = "Encoders" } }, + {113541, new Category { Id = 113541, ParentId = 100249, Name = "Measuring Conv. and Signal Isolators" } }, + {112583, new Category { Id = 112583, ParentId = 100249, Name = "Sensors - Cables" } }, + {100228, new Category { Id = 100228, ParentId = 100124, Name = "Regulation and Control" } }, + {112584, new Category { Id = 112584, ParentId = 100228, Name = "Timers" } }, + {100053, new Category { Id = 100053, ParentId = 112584, Name = "Analogue Timers" } }, + {112585, new Category { Id = 112585, ParentId = 112584, Name = "Digital Timers" } }, + {112586, new Category { Id = 112586, ParentId = 112584, Name = "Timers - Accessories" } }, + {113660, new Category { Id = 113660, ParentId = 100228, Name = "Monitoring Relays" } }, + {112587, new Category { Id = 112587, ParentId = 100228, Name = "Counters" } }, + {112588, new Category { Id = 112588, ParentId = 112587, Name = "Hour Counters" } }, + {100122, new Category { Id = 100122, ParentId = 112587, Name = "Impulse Counters" } }, + {112589, new Category { Id = 112589, ParentId = 100228, Name = "Regulators" } }, + {100121, new Category { Id = 100121, ParentId = 112589, Name = "Temperature Regulators" } }, + {112591, new Category { Id = 112591, ParentId = 100228, Name = "Recorders" } }, + {112592, new Category { Id = 112592, ParentId = 100228, Name = "Safety Switches" } }, + {112593, new Category { Id = 112593, ParentId = 112592, Name = "Standard Safety Switches" } }, + {112594, new Category { Id = 112594, ParentId = 112592, Name = "Line Operated Safety Switches" } }, + {113276, new Category { Id = 113276, ParentId = 112592, Name = "Hinge Safety Switches" } }, + {112595, new Category { Id = 112595, ParentId = 112592, Name = "Safety Switches - Control Modules" } }, + {113725, new Category { Id = 113725, ParentId = 112592, Name = "Light Curtains" } }, + {112596, new Category { Id = 112596, ParentId = 100228, Name = "Motor Control" } }, + {100413, new Category { Id = 100413, ParentId = 113044, Name = "Motor Protection Breakers" } }, + {112597, new Category { Id = 112597, ParentId = 112596, Name = "One Phase Inverters" } }, + {100123, new Category { Id = 100123, ParentId = 112596, Name = "Three Phase Inverters" } }, + {113661, new Category { Id = 113661, ParentId = 112596, Name = "Soft Starters" } }, + {113662, new Category { Id = 113662, ParentId = 112596, Name = "Starters" } }, + {113663, new Category { Id = 113663, ParentId = 112596, Name = "Servo Controllers" } }, + {113664, new Category { Id = 113664, ParentId = 112596, Name = "Stepper Motor Controllers" } }, + {113665, new Category { Id = 113665, ParentId = 112596, Name = "DC Motor Controllers" } }, + {113666, new Category { Id = 113666, ParentId = 112596, Name = "AC Motor Controllers" } }, + {118300, new Category { Id = 118300, ParentId = 112596, Name = "Servo cables" } }, + {112598, new Category { Id = 112598, ParentId = 100228, Name = "Programmable Relays" } }, + {112599, new Category { Id = 112599, ParentId = 112598, Name = "Programmable Relays - Base Modules" } }, + {112600, new Category { Id = 112600, ParentId = 112598, Name = "Programmable Relays - Accessories" } }, + {112601, new Category { Id = 112601, ParentId = 100228, Name = "PLC Drivers" } }, + {113667, new Category { Id = 113667, ParentId = 100228, Name = "HMI Panels" } }, + {100235, new Category { Id = 100235, ParentId = 100228, Name = "Industrial Signalling Devices" } }, + {112602, new Category { Id = 112602, ParentId = 100235, Name = "Sound Signalling Devices" } }, + {112603, new Category { Id = 112603, ParentId = 100235, Name = "Light Signalling Devices" } }, + {112604, new Category { Id = 112604, ParentId = 100235, Name = "Light and Sound Signalling Devices" } }, + {112605, new Category { Id = 112605, ParentId = 100235, Name = "Signalling Columns" } }, + {113668, new Category { Id = 113668, ParentId = 100228, Name = "Building Automation" } }, + {100601, new Category { Id = 100601, ParentId = 100228, Name = "Industrial Networks" } }, + {100405, new Category { Id = 100405, ParentId = 100228, Name = "Limit Switches" } }, + {100495, new Category { Id = 100495, ParentId = 100228, Name = "Pressure switches" } }, + {100611, new Category { Id = 100611, ParentId = 100124, Name = "Electric Motors" } }, + {100637, new Category { Id = 100637, ParentId = 100124, Name = "Solenoids" } }, + {113280, new Category { Id = 113280, ParentId = 111000, Name = "Pneumatics and Hydraulics" } }, + {118123, new Category { Id = 118123, ParentId = 113280, Name = "Pneumatics" } }, + {118124, new Category { Id = 118124, ParentId = 118123, Name = "Actuators" } }, + {118125, new Category { Id = 118125, ParentId = 118123, Name = "Valve and Manifolds" } }, + {118126, new Category { Id = 118126, ParentId = 118123, Name = "Connectors and tubing" } }, + {118127, new Category { Id = 118127, ParentId = 118123, Name = "Air Equipment" } }, + {118128, new Category { Id = 118128, ParentId = 118123, Name = "Instrumentation" } }, + {118129, new Category { Id = 118129, ParentId = 118123, Name = "Vacuum Products" } }, + {118130, new Category { Id = 118130, ParentId = 118123, Name = "Pneumatics accessories" } }, + {118131, new Category { Id = 118131, ParentId = 113280, Name = "Hydraulics" } }, + {118132, new Category { Id = 118132, ParentId = 118131, Name = "Power Hydraulics" } }, + {118133, new Category { Id = 118133, ParentId = 118131, Name = "Industrial Armature" } }, + {112607, new Category { Id = 112607, ParentId = 111000, Name = "Workplace Equipment" } }, + {100164, new Category { Id = 100164, ParentId = 112607, Name = "Measuring Instruments" } }, + {112608, new Category { Id = 112608, ParentId = 100164, Name = "Analog Multimeters" } }, + {112609, new Category { Id = 112609, ParentId = 100164, Name = "Digital Multimeters" } }, + {112610, new Category { Id = 112610, ParentId = 112609, Name = "Portable digital multimeters" } }, + {112611, new Category { Id = 112611, ParentId = 112609, Name = "Benchtop digital multimeters" } }, + {112612, new Category { Id = 112612, ParentId = 112609, Name = "Multimeters - Sets" } }, + {112613, new Category { Id = 112613, ParentId = 100164, Name = "Meters - Accessories" } }, + {112614, new Category { Id = 112614, ParentId = 112613, Name = "Bags & Soft Cases" } }, + {112615, new Category { Id = 112615, ParentId = 112613, Name = "High Voltage Probes" } }, + {112616, new Category { Id = 112616, ParentId = 112613, Name = "Probes & accessories of temperatures" } }, + {112617, new Category { Id = 112617, ParentId = 112613, Name = "Meters - Software" } }, + {100158, new Category { Id = 100158, ParentId = 112613, Name = "Accessories - Others" } }, + {112618, new Category { Id = 112618, ParentId = 100164, Name = "Meters and Clamp Probes" } }, + {100160, new Category { Id = 100160, ParentId = 112618, Name = "Meters and AC Clamp Probes" } }, + {112619, new Category { Id = 112619, ParentId = 112618, Name = "Meters and AC/DC Clamp Probes" } }, + {112620, new Category { Id = 112620, ParentId = 112618, Name = "Clamp Meters - Others" } }, + {100460, new Category { Id = 100460, ParentId = 100164, Name = "Testers and Meters For El. Installations" } }, + {112621, new Category { Id = 112621, ParentId = 100460, Name = "Indicators, Voltage & Continuity Testers" } }, + {112622, new Category { Id = 112622, ParentId = 100460, Name = "Phase Sequence Indicators" } }, + {112623, new Category { Id = 112623, ParentId = 100460, Name = "Insulation Resistance Meters" } }, + {112624, new Category { Id = 112624, ParentId = 100460, Name = "Earth Resistance Meter" } }, + {112625, new Category { Id = 112625, ParentId = 100460, Name = "RCD Testers and Meters" } }, + {112626, new Category { Id = 112626, ParentId = 100460, Name = "Multimeters for Electrical Installations" } }, + {112627, new Category { Id = 112627, ParentId = 100460, Name = "Metals & cables detectors" } }, + {112628, new Category { Id = 112628, ParentId = 100460, Name = "Power Quality Analyzers" } }, + {112629, new Category { Id = 112629, ParentId = 100460, Name = "Voltage and Current Loggers" } }, + {113559, new Category { Id = 113559, ParentId = 100460, Name = "Energy Meters" } }, + {118187, new Category { Id = 118187, ParentId = 100460, Name = "Batteries Testers" } }, + {100461, new Category { Id = 100461, ParentId = 100164, Name = "Meters of environmental conditions" } }, + {112630, new Category { Id = 112630, ParentId = 100461, Name = "Temperature and Humidity Meters" } }, + {112631, new Category { Id = 112631, ParentId = 112630, Name = "Temperature Meters" } }, + {112632, new Category { Id = 112632, ParentId = 112630, Name = "Pirometers" } }, + {112633, new Category { Id = 112633, ParentId = 112630, Name = "Thermohygrometers" } }, + {112634, new Category { Id = 112634, ParentId = 112630, Name = "Hygrometers" } }, + {112635, new Category { Id = 112635, ParentId = 100461, Name = "Temperature and Humidity Loggers" } }, + {112636, new Category { Id = 112636, ParentId = 100461, Name = "Infrared Cameras" } }, + {100541, new Category { Id = 100541, ParentId = 112636, Name = "Fluke Infrared Cameras" } }, + {113321, new Category { Id = 113321, ParentId = 112636, Name = "Infrared Cameras - Others" } }, + {112637, new Category { Id = 112637, ParentId = 100461, Name = "Gas Meters and Loggers" } }, + {112638, new Category { Id = 112638, ParentId = 100461, Name = "Manometers and Pressure Meters" } }, + {112639, new Category { Id = 112639, ParentId = 100461, Name = "pH Meters and Testers" } }, + {112640, new Category { Id = 112640, ParentId = 100461, Name = "Anemometers and Thermoanemometers" } }, + {112641, new Category { Id = 112641, ParentId = 100461, Name = "Luxmeters" } }, + {112642, new Category { Id = 112642, ParentId = 100461, Name = "Sound Meters" } }, + {112643, new Category { Id = 112643, ParentId = 100461, Name = "Distance Meters" } }, + {112644, new Category { Id = 112644, ParentId = 100461, Name = "Tachometers" } }, + {113481, new Category { Id = 113481, ParentId = 100461, Name = "Vibrometers" } }, + {118188, new Category { Id = 118188, ParentId = 100461, Name = "Electromagnet. and Magnetic Field Meters" } }, + {118186, new Category { Id = 118186, ParentId = 100461, Name = "Coating Thickness Testers" } }, + {112645, new Category { Id = 112645, ParentId = 100461, Name = "Meters of Env. Conditions - Others" } }, + {113632, new Category { Id = 113632, ParentId = 100164, Name = "Inspection Cameras, Boroscopes" } }, + {112646, new Category { Id = 112646, ParentId = 100164, Name = "Automotive meters" } }, + {112647, new Category { Id = 112647, ParentId = 112646, Name = "Car Multimeters" } }, + {112649, new Category { Id = 112649, ParentId = 112646, Name = "Car Multimeters - Others" } }, + {112650, new Category { Id = 112650, ParentId = 100164, Name = "Panel Meters" } }, + {112651, new Category { Id = 112651, ParentId = 112650, Name = "Analog Panel Meters" } }, + {118081, new Category { Id = 118081, ParentId = 112651, Name = "Ammeters" } }, + {118082, new Category { Id = 118082, ParentId = 112651, Name = "Voltmeters" } }, + {118083, new Category { Id = 118083, ParentId = 112651, Name = "Power Meters" } }, + {118084, new Category { Id = 118084, ParentId = 112651, Name = "Analog Panel Meters - Others" } }, + {100163, new Category { Id = 100163, ParentId = 112650, Name = "Digital Panel Meters" } }, + {118089, new Category { Id = 118089, ParentId = 100163, Name = "Ammeters" } }, + {118090, new Category { Id = 118090, ParentId = 100163, Name = "Voltmeters" } }, + {118091, new Category { Id = 118091, ParentId = 100163, Name = "Power Network Meters and Analyzers" } }, + {118092, new Category { Id = 118092, ParentId = 100163, Name = "Energy Meters" } }, + {118093, new Category { Id = 118093, ParentId = 100163, Name = "Digital Panel Meters - Others" } }, + {112652, new Category { Id = 112652, ParentId = 112650, Name = "Panel Meters - Accessories" } }, + {118106, new Category { Id = 118106, ParentId = 112652, Name = "Shunts" } }, + {118107, new Category { Id = 118107, ParentId = 112652, Name = "Current Transformers" } }, + {118108, new Category { Id = 118108, ParentId = 112652, Name = "Scales" } }, + {118109, new Category { Id = 118109, ParentId = 112652, Name = "Rogowski Coils" } }, + {118110, new Category { Id = 118110, ParentId = 112652, Name = "Extension modules" } }, + {118111, new Category { Id = 118111, ParentId = 112652, Name = "Panel Meters - Accessories - Others" } }, + {100277, new Category { Id = 100277, ParentId = 100164, Name = "Laboratory instruments" } }, + {112653, new Category { Id = 112653, ParentId = 100277, Name = "LCR Meter" } }, + {112654, new Category { Id = 112654, ParentId = 100277, Name = "Generators and Frequency Meters" } }, + {118117, new Category { Id = 118117, ParentId = 100277, Name = "Logic Analyzers and Testers" } }, + {112655, new Category { Id = 112655, ParentId = 100277, Name = "Spectrum Analyzers" } }, + {112656, new Category { Id = 112656, ParentId = 100277, Name = "Miliohmmeters" } }, + {112657, new Category { Id = 112657, ParentId = 100277, Name = "Decades" } }, + {112658, new Category { Id = 112658, ParentId = 100277, Name = "Calibrators" } }, + {112659, new Category { Id = 112659, ParentId = 100277, Name = "Calibrators - Accessories" } }, + {113416, new Category { Id = 113416, ParentId = 100277, Name = "Data Acquisition Systems" } }, + {113778, new Category { Id = 113778, ParentId = 100277, Name = "Electronic Loads" } }, + {118115, new Category { Id = 118115, ParentId = 100277, Name = "Electrical Safety Testers" } }, + {118298, new Category { Id = 118298, ParentId = 100277, Name = "Power Meters and Analyzers" } }, + {112660, new Category { Id = 112660, ParentId = 100164, Name = "Laboratory instruments - Others" } }, + {100165, new Category { Id = 100165, ParentId = 100164, Name = "Laboratory Power Supplies" } }, + {112661, new Category { Id = 112661, ParentId = 100165, Name = "One Channel Power Supplies" } }, + {112662, new Category { Id = 112662, ParentId = 100165, Name = "Multichannel Power Supplies" } }, + {112663, new Category { Id = 112663, ParentId = 100165, Name = "Programmable Power Supplies" } }, + {100276, new Category { Id = 100276, ParentId = 100164, Name = "Oscilloscopes and Scopemeters" } }, + {112664, new Category { Id = 112664, ParentId = 100276, Name = "Analog Oscilloscopes" } }, + {112665, new Category { Id = 112665, ParentId = 100276, Name = "Digital Oscilloscopes" } }, + {112666, new Category { Id = 112666, ParentId = 100276, Name = "Portable Oscilloscopes, Scopemeters" } }, + {112667, new Category { Id = 112667, ParentId = 100276, Name = "PC connected oscilloscopes" } }, + {112668, new Category { Id = 112668, ParentId = 100276, Name = "Oscilloscopes and Scopemeters - Acc." } }, + {118113, new Category { Id = 118113, ParentId = 112668, Name = "Probes for Oscilloscopes and Scopometers" } }, + {118114, new Category { Id = 118114, ParentId = 112668, Name = "Accessories for Oscilloscopes - Others" } }, + {100514, new Category { Id = 100514, ParentId = 100164, Name = "LAN and Telephone Networks Testers" } }, + {100452, new Category { Id = 100452, ParentId = 112607, Name = "Measuring Accessories" } }, + {112671, new Category { Id = 112671, ParentId = 100452, Name = "Test Leads" } }, + {100451, new Category { Id = 100451, ParentId = 112671, Name = "Single Test Leads" } }, + {112672, new Category { Id = 112672, ParentId = 112671, Name = "Test Leads - Sets" } }, + {112673, new Category { Id = 112673, ParentId = 112671, Name = "Test Leads - Sets with Accessories" } }, + {100371, new Category { Id = 100371, ParentId = 100452, Name = "Probes - Test Plugs" } }, + {100048, new Category { Id = 100048, ParentId = 100452, Name = "Test hooks" } }, + {112674, new Category { Id = 112674, ParentId = 100452, Name = "Test Clips" } }, + {100045, new Category { Id = 100045, ParentId = 100452, Name = "Crocodile Clips" } }, + {112675, new Category { Id = 112675, ParentId = 100045, Name = "4mm Crocodile Clips" } }, + {112676, new Category { Id = 112676, ParentId = 100045, Name = "2mm Crocodile Clips" } }, + {112677, new Category { Id = 112677, ParentId = 100045, Name = "Crocodile Clips - Others" } }, + {112678, new Category { Id = 112678, ParentId = 100452, Name = "Banana & Fork Plugs" } }, + {100046, new Category { Id = 100046, ParentId = 112678, Name = "4mm Banana Plugs" } }, + {112679, new Category { Id = 112679, ParentId = 112678, Name = "2mm Banana Plugs" } }, + {112680, new Category { Id = 112680, ParentId = 112678, Name = "Fork plugs" } }, + {112681, new Category { Id = 112681, ParentId = 100452, Name = "Banana Sockets" } }, + {100047, new Category { Id = 100047, ParentId = 112681, Name = "4mm Banana Sockets" } }, + {112682, new Category { Id = 112682, ParentId = 112681, Name = "2mm Banana Sockets" } }, + {113631, new Category { Id = 113631, ParentId = 100452, Name = "Laboratory Clamps" } }, + {112683, new Category { Id = 112683, ParentId = 100452, Name = "Hangers and uprights on wires" } }, + {112684, new Category { Id = 112684, ParentId = 100452, Name = "Contact Probes" } }, + {113078, new Category { Id = 113078, ParentId = 100452, Name = "Laboratory Connectors - Others" } }, + {100605, new Category { Id = 100605, ParentId = 112607, Name = "Soldering and Welding Equipment" } }, + {100177, new Category { Id = 100177, ParentId = 100605, Name = "Soldering irons and guns" } }, + {100105, new Category { Id = 100105, ParentId = 100605, Name = "Gas soldering irons & torches" } }, + {112685, new Category { Id = 112685, ParentId = 100605, Name = "Soldering & desoldering stations" } }, + {112686, new Category { Id = 112686, ParentId = 112685, Name = "Soldering stations" } }, + {112687, new Category { Id = 112687, ParentId = 112685, Name = "Desoldering stations" } }, + {112688, new Category { Id = 112688, ParentId = 112685, Name = "Soldering-desoldering stations" } }, + {112689, new Category { Id = 112689, ParentId = 112685, Name = "Hot-air stations" } }, + {118184, new Category { Id = 118184, ParentId = 112685, Name = "Service Stations" } }, + {100463, new Category { Id = 100463, ParentId = 100605, Name = "Soldering stations - accessories" } }, + {112690, new Category { Id = 112690, ParentId = 100463, Name = "Soldering iron stands & feeders" } }, + {112691, new Category { Id = 112691, ParentId = 100463, Name = "Sponges & tip cleaners" } }, + {100539, new Category { Id = 100539, ParentId = 100463, Name = "Soldering stations - accessories" } }, + {112692, new Category { Id = 112692, ParentId = 100463, Name = "Soldering accessories others" } }, + {112693, new Category { Id = 112693, ParentId = 100605, Name = "Soldering tips & nozzles" } }, + {100540, new Category { Id = 100540, ParentId = 112693, Name = "Soldering tips" } }, + {112694, new Category { Id = 112694, ParentId = 112693, Name = "Desoldering Tips" } }, + {112695, new Category { Id = 112695, ParentId = 112693, Name = "Hot-air nozzles" } }, + {100306, new Category { Id = 100306, ParentId = 100605, Name = "Soldering fume extraction systems" } }, + {118179, new Category { Id = 118179, ParentId = 100306, Name = "Fume Extractors" } }, + {118180, new Category { Id = 118180, ParentId = 100306, Name = "Fume Extractors - Filters" } }, + {118181, new Category { Id = 118181, ParentId = 100306, Name = "Fume Extractors – Accessories" } }, + {100178, new Category { Id = 100178, ParentId = 100605, Name = "Soldering pots & baths" } }, + {100395, new Category { Id = 100395, ParentId = 100605, Name = "Soldering Devices & Exposure Units" } }, + {112696, new Category { Id = 112696, ParentId = 100395, Name = "Exposure units" } }, + {118163, new Category { Id = 118163, ParentId = 100395, Name = "Preheaters" } }, + {112697, new Category { Id = 112697, ParentId = 100395, Name = "Ultrasonic cleaners" } }, + {118157, new Category { Id = 118157, ParentId = 100395, Name = "Frames and PCB Holders" } }, + {112698, new Category { Id = 112698, ParentId = 100395, Name = "Soldering devices others" } }, + {100106, new Category { Id = 100106, ParentId = 100605, Name = "Auxiliary soldering tools" } }, + {112699, new Category { Id = 112699, ParentId = 100106, Name = "Pick & place tools" } }, + {112700, new Category { Id = 112700, ParentId = 100106, Name = "Component lead forming devices" } }, + {112701, new Category { Id = 112701, ParentId = 100106, Name = "Desoldering pumps" } }, + {100645, new Category { Id = 100645, ParentId = 100106, Name = "Various soldering tools" } }, + {100483, new Category { Id = 100483, ParentId = 100605, Name = "Desoldering wicks" } }, + {100305, new Category { Id = 100305, ParentId = 100605, Name = "Dispensers & accessories" } }, + {112702, new Category { Id = 112702, ParentId = 100305, Name = "Dispensers" } }, + {112703, new Category { Id = 112703, ParentId = 100305, Name = "Barrels & cartridges" } }, + {112704, new Category { Id = 112704, ParentId = 100305, Name = "Dispensers - pen & bottles" } }, + {112705, new Category { Id = 112705, ParentId = 100305, Name = "Tips and nozzles" } }, + {112706, new Category { Id = 112706, ParentId = 100305, Name = "Various dispensing products" } }, + {112707, new Category { Id = 112707, ParentId = 100605, Name = "Solders" } }, + {100482, new Category { Id = 100482, ParentId = 112707, Name = "Solders - wires" } }, + {113748, new Category { Id = 113748, ParentId = 100482, Name = "Solder wires - lead free" } }, + {112708, new Category { Id = 112708, ParentId = 112707, Name = "Solders - other" } }, + {113750, new Category { Id = 113750, ParentId = 112708, Name = "Solders - other: lead free" } }, + {100484, new Category { Id = 100484, ParentId = 100605, Name = "Fluxes" } }, + {112710, new Category { Id = 112710, ParentId = 100605, Name = "Soldering chemicals" } }, + {118159, new Category { Id = 118159, ParentId = 112710, Name = "High Temperature Resistant Tapes" } }, + {118162, new Category { Id = 118162, ParentId = 112710, Name = "Soldering Chemicals Others" } }, + {113348, new Category { Id = 113348, ParentId = 100605, Name = "Welding Equipment" } }, + {113349, new Category { Id = 113349, ParentId = 113348, Name = "Inverter Welders" } }, + {113350, new Category { Id = 113350, ParentId = 113348, Name = "Plasma Cutters" } }, + {113356, new Category { Id = 113356, ParentId = 113348, Name = "Spare Parts and Accessories" } }, + {113357, new Category { Id = 113357, ParentId = 113356, Name = "Handles and Welding Cables" } }, + {114075, new Category { Id = 114075, ParentId = 113356, Name = "Other Parts" } }, + {113361, new Category { Id = 113361, ParentId = 113348, Name = "Masks and Protective Clothing" } }, + {112711, new Category { Id = 112711, ParentId = 112607, Name = "PCB prototyping & production" } }, + {112712, new Category { Id = 112712, ParentId = 112711, Name = "Copper laminates" } }, + {112713, new Category { Id = 112713, ParentId = 112712, Name = "One-layer laminates" } }, + {112714, new Category { Id = 112714, ParentId = 112712, Name = "Two-layers laminates" } }, + {100110, new Category { Id = 100110, ParentId = 112711, Name = "Universal PCBs" } }, + {100650, new Category { Id = 100650, ParentId = 112711, Name = "Assembly kits" } }, + {100196, new Category { Id = 100196, ParentId = 112711, Name = "Materials for PCB production" } }, + {58, new Category { Id = 58, ParentId = 112607, Name = "Chemical products" } }, + {100193, new Category { Id = 100193, ParentId = 58, Name = "Glues" } }, + {100194, new Category { Id = 100194, ParentId = 58, Name = "Encapsulating materials" } }, + {100192, new Category { Id = 100192, ParentId = 58, Name = "Heat conductive compounds" } }, + {100111, new Category { Id = 100111, ParentId = 58, Name = "Marker pens, felt-tip pens, paints" } }, + {100098, new Category { Id = 100098, ParentId = 58, Name = "Cleaning & maintaining products" } }, + {100191, new Category { Id = 100191, ParentId = 58, Name = "Lubricants" } }, + {113775, new Category { Id = 113775, ParentId = 58, Name = "Chemicals for Food Industry" } }, + {100099, new Category { Id = 100099, ParentId = 58, Name = "Wipes & cleaning clothes" } }, + {112715, new Category { Id = 112715, ParentId = 58, Name = "Tapes" } }, + {113373, new Category { Id = 113373, ParentId = 112715, Name = "Electrotechnical tapes" } }, + {113374, new Category { Id = 113374, ParentId = 113373, Name = "Insulating tapes" } }, + {113375, new Category { Id = 113375, ParentId = 113373, Name = "Shielding and grounding tapes" } }, + {113376, new Category { Id = 113376, ParentId = 113373, Name = "Self-amalgamating tapes" } }, + {113377, new Category { Id = 113377, ParentId = 112715, Name = "Thermoconductive tapes" } }, + {113378, new Category { Id = 113378, ParentId = 112715, Name = "Fixing tapes" } }, + {113379, new Category { Id = 113379, ParentId = 112715, Name = "Repair tapes" } }, + {113380, new Category { Id = 113380, ParentId = 112715, Name = "Masking tapes" } }, + {113382, new Category { Id = 113382, ParentId = 112715, Name = "Other tapes" } }, + {118121, new Category { Id = 118121, ParentId = 112715, Name = "Accessories for tapes" } }, + {100100, new Category { Id = 100100, ParentId = 58, Name = "Chemicals others" } }, + {100168, new Category { Id = 100168, ParentId = 112607, Name = "Tools" } }, + {112718, new Category { Id = 112718, ParentId = 100168, Name = "Screwdrivers, Ceramic Screwdrivers" } }, + {112719, new Category { Id = 112719, ParentId = 112718, Name = "Screwdrivers" } }, + {112720, new Category { Id = 112720, ParentId = 112718, Name = "Insulated Screwdrivers" } }, + {113765, new Category { Id = 113765, ParentId = 112718, Name = "Screwdrivers Sets" } }, + {112721, new Category { Id = 112721, ParentId = 112718, Name = "Ceramic Screwdrivers (Trimmers)" } }, + {100117, new Category { Id = 100117, ParentId = 100168, Name = "Screwdriver Bits" } }, + {113761, new Category { Id = 113761, ParentId = 100168, Name = "Screwdriver Bits Sets" } }, + {112722, new Category { Id = 112722, ParentId = 100168, Name = "Wrenches, Wrenches Sets" } }, + {112723, new Category { Id = 112723, ParentId = 112722, Name = "Wrenches and Combination Wrenches" } }, + {112724, new Category { Id = 112724, ParentId = 112722, Name = "Hex and Torx keys" } }, + {113766, new Category { Id = 113766, ParentId = 112722, Name = "Socket Wrenches" } }, + {113767, new Category { Id = 113767, ParentId = 112722, Name = "Adjustable Wrenches" } }, + {113768, new Category { Id = 113768, ParentId = 112722, Name = "Torque Wrenches" } }, + {112725, new Category { Id = 112725, ParentId = 112722, Name = "Wrenches Sets" } }, + {112726, new Category { Id = 112726, ParentId = 112722, Name = "Wrenches - Others" } }, + {100114, new Category { Id = 100114, ParentId = 100168, Name = "General Purpose Tools" } }, + {112727, new Category { Id = 112727, ParentId = 100114, Name = "Files, Scrapers" } }, + {112728, new Category { Id = 112728, ParentId = 100114, Name = "Saw and Hack Saw" } }, + {112729, new Category { Id = 112729, ParentId = 100114, Name = "Hammers and Axes" } }, + {113783, new Category { Id = 113783, ParentId = 100114, Name = "Vices and Clamps" } }, + {112730, new Category { Id = 112730, ParentId = 100114, Name = "General Purpose Tools - Others" } }, + {100113, new Category { Id = 100113, ParentId = 100168, Name = "Pliers, Shears, Knives" } }, + {112731, new Category { Id = 112731, ParentId = 100113, Name = "Cutting Pliers" } }, + {112732, new Category { Id = 112732, ParentId = 100113, Name = "Flat and Semicircular Pliers" } }, + {112733, new Category { Id = 112733, ParentId = 100113, Name = "Universal Pliers" } }, + {112734, new Category { Id = 112734, ParentId = 100113, Name = "Insulated Pliers" } }, + {113770, new Category { Id = 113770, ParentId = 100113, Name = "Adjustable Pliers" } }, + {113771, new Category { Id = 113771, ParentId = 100113, Name = "Ring Pliers" } }, + {113772, new Category { Id = 113772, ParentId = 100113, Name = "Locking Pliers" } }, + {112735, new Category { Id = 112735, ParentId = 100113, Name = "Special Pliers" } }, + {113773, new Category { Id = 113773, ParentId = 100113, Name = "Pliers Sets" } }, + {112736, new Category { Id = 112736, ParentId = 100113, Name = "Shears, Scissors, Knives" } }, + {113774, new Category { Id = 113774, ParentId = 100113, Name = "Wire Rope and Cable Cutters" } }, + {100436, new Category { Id = 100436, ParentId = 100168, Name = "Tweezers" } }, + {112737, new Category { Id = 112737, ParentId = 100436, Name = "Universal Tweezers" } }, + {112738, new Category { Id = 112738, ParentId = 100436, Name = "Precision Tweezers" } }, + {112739, new Category { Id = 112739, ParentId = 100436, Name = "ESD Tweezers" } }, + {112740, new Category { Id = 112740, ParentId = 100168, Name = "Strippers for wire & cable" } }, + {100169, new Category { Id = 100169, ParentId = 112740, Name = "Strippers for wire & cable" } }, + {100115, new Category { Id = 100115, ParentId = 100168, Name = "Crimping Tools" } }, + {112742, new Category { Id = 112742, ParentId = 100115, Name = "Crimping Tools for Terminals" } }, + {112743, new Category { Id = 112743, ParentId = 100115, Name = "Crimping Tools for Coaxial/RF Connectors" } }, + {112744, new Category { Id = 112744, ParentId = 100115, Name = "Crimping Tools for RJ Plugs" } }, + {112745, new Category { Id = 112745, ParentId = 100115, Name = "Crimping Tools - Others" } }, + {113769, new Category { Id = 113769, ParentId = 100115, Name = "Dedicated Crimping Tools" } }, + {113671, new Category { Id = 113671, ParentId = 100168, Name = "Tools and Acc. for Working at Height" } }, + {100387, new Category { Id = 100387, ParentId = 100168, Name = "Measuring Tools" } }, + {113669, new Category { Id = 113669, ParentId = 100168, Name = "Repair and Construction Tools" } }, + {100171, new Category { Id = 100171, ParentId = 100168, Name = "Inspection Tools" } }, + {112746, new Category { Id = 112746, ParentId = 100171, Name = "Magnifying Glasses" } }, + {112747, new Category { Id = 112747, ParentId = 100171, Name = "Desktop Magnifiers with Backlight" } }, + {112748, new Category { Id = 112748, ParentId = 100171, Name = "Microscopes" } }, + {112749, new Category { Id = 112749, ParentId = 100171, Name = "Inspection Tools - Others" } }, + {114021, new Category { Id = 114021, ParentId = 100168, Name = "Industrial and Workshop Lighting" } }, + {112750, new Category { Id = 112750, ParentId = 100168, Name = "Tool Sets, Cases, Tool Bags" } }, + {112751, new Category { Id = 112751, ParentId = 112750, Name = "Tool Sets" } }, + {100118, new Category { Id = 100118, ParentId = 112750, Name = "Tool bags and cases" } }, + {113543, new Category { Id = 113543, ParentId = 100168, Name = "Handles, Stands" } }, + {100466, new Category { Id = 100466, ParentId = 100168, Name = "Glue Guns, Hot Air Guns" } }, + {112752, new Category { Id = 112752, ParentId = 100466, Name = "Glue Guns and Stick Adhesives Glues" } }, + {112753, new Category { Id = 112753, ParentId = 100466, Name = "Hot Air Guns and Accessories" } }, + {113796, new Category { Id = 113796, ParentId = 100168, Name = "Pneumatic Tools and Accessories" } }, + {113797, new Category { Id = 113797, ParentId = 113796, Name = "Pneumatic Tools" } }, + {113798, new Category { Id = 113798, ParentId = 113796, Name = "Accessories for Pneumatic Tools" } }, + {100170, new Category { Id = 100170, ParentId = 100168, Name = "Power Tools & Accessories" } }, + {112754, new Category { Id = 112754, ParentId = 100170, Name = "Electric Power Tools" } }, + {112755, new Category { Id = 112755, ParentId = 100170, Name = "Cordless Power Tools" } }, + {100116, new Category { Id = 100116, ParentId = 100170, Name = "Power Tools - Parts and Accessories" } }, + {113451, new Category { Id = 113451, ParentId = 113449, Name = "Cutting and Grinding Discs" } }, + {113482, new Category { Id = 113482, ParentId = 100168, Name = "Drills" } }, + {113483, new Category { Id = 113483, ParentId = 113482, Name = "Drills for Metal" } }, + {113484, new Category { Id = 113484, ParentId = 113482, Name = "Drills for Concrete" } }, + {113485, new Category { Id = 113485, ParentId = 113482, Name = "Drills for Wood" } }, + {113486, new Category { Id = 113486, ParentId = 113482, Name = "Drills - Others" } }, + {113782, new Category { Id = 113782, ParentId = 113482, Name = "Drill Sets" } }, + {113487, new Category { Id = 113487, ParentId = 100168, Name = "Threading Dies and Taps" } }, + {113488, new Category { Id = 113488, ParentId = 100168, Name = "Reamers" } }, + {113449, new Category { Id = 113449, ParentId = 100168, Name = "Abrasive materials" } }, + {113450, new Category { Id = 113450, ParentId = 113449, Name = "Micro Abrasive Materials" } }, + {113451, new Category { Id = 113451, ParentId = 113449, Name = "Cutting and Grinding Discs" } }, + {113452, new Category { Id = 113452, ParentId = 113449, Name = "Abrasive Sheets and Discs" } }, + {114063, new Category { Id = 114063, ParentId = 113449, Name = "Abrasive Brushes and Sponges" } }, + {113734, new Category { Id = 113734, ParentId = 100168, Name = "Garden Tools" } }, + {100174, new Category { Id = 100174, ParentId = 112607, Name = "Antistatic Protection" } }, + {100173, new Category { Id = 100173, ParentId = 100174, Name = "Static Protection-Personal" } }, + {112756, new Category { Id = 112756, ParentId = 100173, Name = "Antistatic Wirst Bands" } }, + {112757, new Category { Id = 112757, ParentId = 100173, Name = "Antistatic Shoes Grounders" } }, + {112758, new Category { Id = 112758, ParentId = 100173, Name = "ESD Clothing" } }, + {118075, new Category { Id = 118075, ParentId = 112758, Name = "Coats, Coveralls and Shirts" } }, + {118076, new Category { Id = 118076, ParentId = 112758, Name = "Protective Gloves and Thimbles" } }, + {112759, new Category { Id = 112759, ParentId = 100173, Name = "ESD Mats" } }, + {112760, new Category { Id = 112760, ParentId = 112759, Name = "ESD Bench Mats" } }, + {112761, new Category { Id = 112761, ParentId = 112759, Name = "ESD Floor Mats" } }, + {112762, new Category { Id = 112762, ParentId = 112759, Name = "ESD Workstations" } }, + {112763, new Category { Id = 112763, ParentId = 100173, Name = "ESD Accessories" } }, + {112764, new Category { Id = 112764, ParentId = 100173, Name = "ESD Inspection" } }, + {112765, new Category { Id = 112765, ParentId = 100173, Name = "Static Protection-Personal Others" } }, + {118119, new Category { Id = 118119, ParentId = 100174, Name = "ESD Chairs and Stools" } }, + {112766, new Category { Id = 112766, ParentId = 100174, Name = "ESD Boxes, Lockers" } }, + {118105, new Category { Id = 118105, ParentId = 100174, Name = "ESD Brushes" } }, + {112767, new Category { Id = 112767, ParentId = 100174, Name = "ESD Foams" } }, + {100175, new Category { Id = 100175, ParentId = 100174, Name = "ESD Bags and Foils" } }, + {118077, new Category { Id = 118077, ParentId = 100174, Name = "Antistatic Chemical Products" } }, + {118120, new Category { Id = 118120, ParentId = 100174, Name = "Humidity Indicators and Desiccants" } }, + {118078, new Category { Id = 118078, ParentId = 100174, Name = "ESD Office Supplies" } }, + {118079, new Category { Id = 118079, ParentId = 100174, Name = "Tapes and Labels" } }, + {118080, new Category { Id = 118080, ParentId = 100174, Name = "Ionizers" } }, + {100172, new Category { Id = 100172, ParentId = 100174, Name = "Antistatic Protection Others" } }, + {118136, new Category { Id = 118136, ParentId = 112607, Name = "Cleanroom" } }, + {118137, new Category { Id = 118137, ParentId = 118136, Name = "Clothing" } }, + {118149, new Category { Id = 118149, ParentId = 118137, Name = "Coats" } }, + {118150, new Category { Id = 118150, ParentId = 118137, Name = "Protective Gloves and Thimbles" } }, + {118151, new Category { Id = 118151, ParentId = 118137, Name = "Protection Personal - Others" } }, + {118152, new Category { Id = 118152, ParentId = 118136, Name = "Bags and Sacks" } }, + {118153, new Category { Id = 118153, ParentId = 118136, Name = "Dispensers" } }, + {118138, new Category { Id = 118138, ParentId = 118136, Name = "Adhesive mats" } }, + {118154, new Category { Id = 118154, ParentId = 118136, Name = "Office Equipment" } }, + {118185, new Category { Id = 118185, ParentId = 118136, Name = "Wipes & Cleaning Clothes" } }, + {118140, new Category { Id = 118140, ParentId = 118136, Name = "Cleanroom - others" } }, + {100456, new Category { Id = 100456, ParentId = 112607, Name = "Storage" } }, + {100454, new Category { Id = 100454, ParentId = 100456, Name = "Containers and Boxes" } }, + {112768, new Category { Id = 112768, ParentId = 100456, Name = "Drawers and Sets" } }, + {100457, new Category { Id = 100457, ParentId = 100456, Name = "Packing" } }, + {100458, new Category { Id = 100458, ParentId = 100456, Name = "Printers and Markers" } }, + {100455, new Category { Id = 100455, ParentId = 100456, Name = "Warehouse Devices" } }, + {113786, new Category { Id = 113786, ParentId = 100447, Name = "Safety Signs" } }, + {113787, new Category { Id = 113787, ParentId = 100447, Name = "Warning and Marking Tapes" } }, + {100446, new Category { Id = 100446, ParentId = 112607, Name = "Health and Safety" } }, + {100447, new Category { Id = 100447, ParentId = 100446, Name = "Warning and Informations" } }, + {113786, new Category { Id = 113786, ParentId = 100447, Name = "Safety Signs" } }, + {113787, new Category { Id = 113787, ParentId = 100447, Name = "Warning and Marking Tapes" } }, + {100445, new Category { Id = 100445, ParentId = 100446, Name = "Personal Protection" } }, + {112770, new Category { Id = 112770, ParentId = 100445, Name = "Respiratory Protection" } }, + {113788, new Category { Id = 113788, ParentId = 100445, Name = "Head and Face Protection" } }, + {112771, new Category { Id = 112771, ParentId = 100445, Name = "Eye Protection" } }, + {113789, new Category { Id = 113789, ParentId = 100445, Name = "Hearing Protection" } }, + {112772, new Category { Id = 112772, ParentId = 100445, Name = "Hand Protection" } }, + {113790, new Category { Id = 113790, ParentId = 100445, Name = "Leg protection" } }, + {112773, new Category { Id = 112773, ParentId = 100445, Name = "Work and Protective Clothing" } }, + {112774, new Category { Id = 112774, ParentId = 100446, Name = "Health and Safety - Others" } }, + {118096, new Category { Id = 118096, ParentId = 111000, Name = "Office Equipment" } }, + {118097, new Category { Id = 118097, ParentId = 118096, Name = "Writing Accessories" } }, + {118098, new Category { Id = 118098, ParentId = 118096, Name = "Paper Supplies" } }, + {118100, new Category { Id = 118100, ParentId = 118096, Name = "Office Fans" } }, + {118099, new Category { Id = 118099, ParentId = 118096, Name = "Office Accessories" } }, + {71, new Category { Id = 71, ParentId = 111000, Name = "Car Audio" } }, + {113255, new Category { Id = 113255, ParentId = 112533, Name = "Heat Shrink Tubes" } }, + {112775, new Category { Id = 112775, ParentId = 71, Name = "Car Antennas" } }, + {100542, new Category { Id = 100542, ParentId = 112775, Name = "GPS and GSM Car Antennas" } }, + {100553, new Category { Id = 100553, ParentId = 112775, Name = "CB Car Antennas" } }, + {112776, new Category { Id = 112776, ParentId = 112775, Name = "TV Car Antennas" } }, + {100238, new Category { Id = 100238, ParentId = 112775, Name = "Radio Car Antennas" } }, + {100204, new Category { Id = 100204, ParentId = 112783, Name = "Car antennas plugs and adapters" } }, + {112777, new Category { Id = 112777, ParentId = 71, Name = "Adapters" } }, + {100202, new Category { Id = 100202, ParentId = 112777, Name = "Car Radio Adapters" } }, + {100573, new Category { Id = 100573, ParentId = 112777, Name = "Stalk Adapters" } }, + {100603, new Category { Id = 100603, ParentId = 112777, Name = "Car navigation adapters" } }, + {100203, new Category { Id = 100203, ParentId = 112777, Name = "Speaker Adapters" } }, + {100683, new Category { Id = 100683, ParentId = 112777, Name = "Active System Adapters" } }, + {113099, new Category { Id = 113099, ParentId = 71, Name = "Interfaces" } }, + {100608, new Category { Id = 100608, ParentId = 113099, Name = "AUX Interfaces" } }, + {100510, new Category { Id = 100510, ParentId = 113099, Name = "Aux Adapters" } }, + {112781, new Category { Id = 112781, ParentId = 71, Name = "Car Speakers" } }, + {100126, new Category { Id = 100126, ParentId = 112781, Name = "Car Speakers" } }, + {100230, new Category { Id = 100230, ParentId = 112781, Name = "Plastic Mounting Accessories" } }, + {113177, new Category { Id = 113177, ParentId = 112781, Name = "MDF Mounting Accessories" } }, + {113202, new Category { Id = 113202, ParentId = 112781, Name = "Loudspeaker Enclosures" } }, + {113261, new Category { Id = 113261, ParentId = 112781, Name = "Acoustic Accessories" } }, + {112782, new Category { Id = 112782, ParentId = 71, Name = "Frames" } }, + {100226, new Category { Id = 100226, ParentId = 112782, Name = "Facia Plates" } }, + {112783, new Category { Id = 112783, ParentId = 71, Name = "Connectors" } }, + {100127, new Category { Id = 100127, ParentId = 112783, Name = "Connectors for panel car audio" } }, + {100459, new Category { Id = 100459, ParentId = 112783, Name = "Connectors for original car audio" } }, + {100532, new Category { Id = 100532, ParentId = 112783, Name = "Housings and terminals for car audio" } }, + {100205, new Category { Id = 100205, ParentId = 112783, Name = "ISO plugs and sockets" } }, + {100204, new Category { Id = 100204, ParentId = 112783, Name = "Car antennas plugs and adapters" } }, + {100602, new Category { Id = 100602, ParentId = 71, Name = "Car Power Accessories" } }, + {100414, new Category { Id = 100414, ParentId = 71, Name = "Frames and half frames for radio and CB" } }, + {100509, new Category { Id = 100509, ParentId = 71, Name = "Professional Car Audio Accessories" } }, + {100197, new Category { Id = 100197, ParentId = 71, Name = "Speakers Grilles, Front Panel Holders" } }, + {100415, new Category { Id = 100415, ParentId = 71, Name = "Radio-Panel Tapes" } }, + {100443, new Category { Id = 100443, ParentId = 71, Name = "Radio Release Keys" } }, + {100200, new Category { Id = 100200, ParentId = 71, Name = "CD Changer Cables" } }, + {112784, new Category { Id = 112784, ParentId = 71, Name = "Park sensors and driving recorders" } }, + {100527, new Category { Id = 100527, ParentId = 71, Name = "Hands free kit cables" } }, + {113741, new Category { Id = 113741, ParentId = 71, Name = "Car Holders" } }, + {113643, new Category { Id = 113643, ParentId = 111000, Name = "Computer Accessories" } }, + {113644, new Category { Id = 113644, ParentId = 113643, Name = "Memory Cards" } }, + {113645, new Category { Id = 113645, ParentId = 113643, Name = "Pendrives" } }, + {118182, new Category { Id = 118182, ParentId = 113643, Name = "Memory Modules" } }, + {113646, new Category { Id = 113646, ParentId = 113643, Name = "Computer Power Supply Units and UPSs" } }, + {113647, new Category { Id = 113647, ParentId = 113643, Name = "Peripherals" } }, + {113648, new Category { Id = 113648, ParentId = 113643, Name = "Stands and Holders" } }, + {113649, new Category { Id = 113649, ParentId = 113643, Name = "HDD/SSD Accessories" } }, + {113650, new Category { Id = 113650, ParentId = 113643, Name = "Computer Adapters" } }, + {113642, new Category { Id = 113642, ParentId = 113643, Name = "Socket Strips" } }, + {113651, new Category { Id = 113651, ParentId = 113643, Name = "Computer Accessories - Others" } }, + {113742, new Category { Id = 113742, ParentId = 113643, Name = "Privacy Filters" } }, + {113324, new Category { Id = 113324, ParentId = 111000, Name = "Robotics and Prototyping" } }, + {113325, new Category { Id = 113325, ParentId = 113324, Name = "Programmable Controllers" } }, + {113690, new Category { Id = 113690, ParentId = 113324, Name = "Sensor Modules" } }, + {113691, new Category { Id = 113691, ParentId = 113690, Name = "Environmental Sensors" } }, + {113692, new Category { Id = 113692, ParentId = 113690, Name = "Position Sensors" } }, + {113693, new Category { Id = 113693, ParentId = 113690, Name = "Distance Sensors" } }, + {113694, new Category { Id = 113694, ParentId = 113690, Name = "Other Sensors" } }, + {113695, new Category { Id = 113695, ParentId = 113690, Name = "Sets and Accessories" } }, + {113696, new Category { Id = 113696, ParentId = 113324, Name = "Audio-Video Modules" } }, + {113697, new Category { Id = 113697, ParentId = 113696, Name = "Audio Modules" } }, + {113698, new Category { Id = 113698, ParentId = 113696, Name = "Camera Modules" } }, + {113699, new Category { Id = 113699, ParentId = 113324, Name = "Other Modules" } }, + {113700, new Category { Id = 113700, ParentId = 113699, Name = "Connector Modules" } }, + {113701, new Category { Id = 113701, ParentId = 113699, Name = "Converters" } }, + {113702, new Category { Id = 113702, ParentId = 113699, Name = "Relay Modules" } }, + {113703, new Category { Id = 113703, ParentId = 113699, Name = "RTC Modules" } }, + {113704, new Category { Id = 113704, ParentId = 113699, Name = "Adapters" } }, + {113705, new Category { Id = 113705, ParentId = 113699, Name = "Other Modules" } }, + {113688, new Category { Id = 113688, ParentId = 113324, Name = "Power Supply Modules" } }, + {113706, new Category { Id = 113706, ParentId = 113688, Name = "Converter Modules" } }, + {113707, new Category { Id = 113707, ParentId = 113688, Name = "Charger Modules" } }, + {113708, new Category { Id = 113708, ParentId = 113688, Name = "Others Power Supply Modules" } }, + {113328, new Category { Id = 113328, ParentId = 113324, Name = "Motor Control Modules" } }, + {113689, new Category { Id = 113689, ParentId = 113324, Name = "Micromotors and Accessories" } }, + {113709, new Category { Id = 113709, ParentId = 113689, Name = "DC Motors" } }, + {113710, new Category { Id = 113710, ParentId = 113689, Name = "BLDC Motors" } }, + {113711, new Category { Id = 113711, ParentId = 113689, Name = "Stepper Motors" } }, + {113712, new Category { Id = 113712, ParentId = 113689, Name = "Servo Motors" } }, + {113713, new Category { Id = 113713, ParentId = 113689, Name = "Accessories for Micromotors" } }, + {113714, new Category { Id = 113714, ParentId = 113324, Name = "Robotics and RC" } }, + {113715, new Category { Id = 113715, ParentId = 113714, Name = "Controllers" } }, + {113716, new Category { Id = 113716, ParentId = 113714, Name = "Frames and Chassis" } }, + {113717, new Category { Id = 113717, ParentId = 113714, Name = "Accessories for Robotics and RC" } }, + {113413, new Category { Id = 113413, ParentId = 113324, Name = "3D Printers and Accessories" } }, + {113776, new Category { Id = 113776, ParentId = 113324, Name = "Industrial Robotics" } }, +}; + + public static Category? GetCategory(int categoryId) + { + _categories.TryGetValue(categoryId, out var category); + return category; + } + + public static Category? GetCategory(string categoryName) + { + return _categories + .Where(x => x.Value.Name?.Equals(categoryName, StringComparison.InvariantCultureIgnoreCase) == true) + .Select(x => x.Value) + .FirstOrDefault(); + } + } +} diff --git a/Binner/Library/Binner.Model/Integrations/Tme/TmeLanguages.cs b/Binner/Library/Binner.Model/Integrations/Tme/TmeLanguages.cs new file mode 100644 index 00000000..5179deaa --- /dev/null +++ b/Binner/Library/Binner.Model/Integrations/Tme/TmeLanguages.cs @@ -0,0 +1,95 @@ +namespace Binner.Model.Integrations.Tme +{ + public static class TmeLanguages + { + public static List Languages = new List + { + "AT", + "BG", + "CH", + "CZ", + "DE", + "EE", + "EN", + "ES", + "FI", + "FR", + "GR", + "HR", + "HU", + "IT", + "LT", + "LV", + "NL", + "PL", + "PT", + "RO", + "RU", + "SE", + "SK", + "TR", + "UA" + }; + + /// + /// Maps an official ISO2 language to a TME language + /// + /// + /// + public static string MapLanguage(Languages language) + { + switch (language.ToString().ToUpper()) + { + case "BG": + return "BG"; // Bulgarian + case "RM": + return "CH"; // Switzerland, romansh + case "CZ": + return "CZ"; // Czech + case "DE": + return "AT"; // Austria / German + case "ET": + return "ET"; // Estonia, Estonian + case "ES": + return "ES"; // Spanish + case "FI": + return "FI"; // Finnish + case "FR": + return "FR"; // French + case "EL": + return "GR"; // Greek + case "HR": + return "HR"; // Croatian + case "HU": + return "HU"; // Hungarian + case "IT": + return "IT"; // Italian + case "LT": + return "LT"; // Lithuanian + case "LV": + return "LV"; // Latvian + case "NL": + return "NL"; // Dutch + case "PL": + return "PL"; // Polish + case "PT": + return "PT"; // Portuguese + case "RO": + return "RO"; // Romanian + case "RU": + return "RU"; // Russian + case "SE": + return "SV"; // Swedish + case "SK": + return "SK"; // Solvak + case "TR": + return "TR"; // Turkish + case "UA": + return "UK"; // Ukrainian + case "EN": + default: + return "EN"; + } + } + } +} diff --git a/Binner/Library/Binner.Model/Integrations/Tme/TmeResponse.cs b/Binner/Library/Binner.Model/Integrations/Tme/TmeResponse.cs new file mode 100644 index 00000000..442ae472 --- /dev/null +++ b/Binner/Library/Binner.Model/Integrations/Tme/TmeResponse.cs @@ -0,0 +1,14 @@ +namespace Binner.Model.Integrations.Tme +{ + public class TmeResponse + { + /// + /// Response status. "OK" indicates that the action was successful + /// + public string? Status { get; set; } + /// + /// Action response data + /// + public T? Data { get; set; } + } +} diff --git a/Binner/Library/Binner.Model/Languages.cs b/Binner/Library/Binner.Model/Languages.cs index b1717b3c..7e7f0aa7 100644 --- a/Binner/Library/Binner.Model/Languages.cs +++ b/Binner/Library/Binner.Model/Languages.cs @@ -5,6 +5,7 @@ /// public enum Languages { + // DigiKey En, De, It, @@ -26,6 +27,17 @@ public enum Languages Sv, Th, Zhs, - Zht + Zht, + // TME + Bg, + Rm, + El, + Hr, + Lt, + Lv, + Ru, + Sk, + Tr, + Uk } } diff --git a/Binner/Library/Binner.Model/Requests/SettingsRequest.cs b/Binner/Library/Binner.Model/Requests/SettingsRequest.cs index 1e3fa601..8275e6e3 100644 --- a/Binner/Library/Binner.Model/Requests/SettingsRequest.cs +++ b/Binner/Library/Binner.Model/Requests/SettingsRequest.cs @@ -26,6 +26,11 @@ public class SettingsRequest /// public ArrowUserConfiguration Arrow { get; set; } = new(); + /// + /// TME config + /// + public TmeUserConfiguration Tme { get; set; } = new(); + /// /// Binner swarm config /// diff --git a/Binner/Library/Binner.Model/Responses/SettingsResponse.cs b/Binner/Library/Binner.Model/Responses/SettingsResponse.cs index 09beb34c..76598939 100644 --- a/Binner/Library/Binner.Model/Responses/SettingsResponse.cs +++ b/Binner/Library/Binner.Model/Responses/SettingsResponse.cs @@ -24,6 +24,11 @@ public class SettingsResponse /// public ArrowUserConfiguration Arrow { get; set; } = new(); + /// + /// TME config + /// + public TmeUserConfiguration Tme { get; set; } = new(); + /// /// Binner config ///