# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)

# Create Panchayats
%w(Thiruvananthapuram Kollam Pathanamthitta Alappuzha Kottayam Idukki Ernakulam Thrissur Palakkad Malappuram Kozhikode Wayanad Kannur Kasaragod).each do |d|
  District.create!(name: d)
end

User.create({ email: "admin@gmail.com", password: "pass123", password_confirmation: "pass123", role: :admin })
Port.create({ name: "Kochi", port_type: "airport" })


district = District.find_by(name: "Ernakulam")
["Aikaranad  Grama Panchayat",
  "Alangad Block Panchayat",
  "Alangad Grama Panchayat",
  "Aluva Municipality",
  "Amballoor  Grama Panchayat",
  "Angamaly  Block Panchayat",
  "Angamaly  Municipality",
  "Arakuzha  Grama Panchayat",
  "Asamannoor  Grama Panchayat",
  "Avoly  Grama Panchayat",
  "Ayavana  Grama Panchayat",
  "Ayyampuzha  Grama Panchayat",
  "Chellanam  Grama Panchayat",
  "Chendamangalam  Grama Panchayat",
  "Chengamanad  Grama Panchayat",
  "Cheranalloor  Grama Panchayat",
  "Chittattukara  Grama Panchayat",
  "Choornikkara  Grama Panchayat",
  "Chottanikkara  Grama Panchayat",
  "Cochin  Corporation",
  "Edakkattuvayal  Grama Panchayat",
  "Edappally  Block Panchayat",
  "Edathala  Grama Panchayat",
  "Edavanakkad  Grama Panchayat",
  "Elanji  Grama Panchayat",
  "Elankunnapuzha  Grama Panchayat",
  "Eloor Municipality",
  "Ernakulam  District Panchayat",
  "Ezhikkara  Grama Panchayat",
  "Kadamakudy  Grama Panchayat",
  "Kadungalloor  Grama Panchayat",
  "Kalady  Grama Panchayat",
  "Kalamassery  Municipality",
  "Kalloorkad  Grama Panchayat",
  "Kanjoor  Grama Panchayat",
  "Karukutty  Grama Panchayat",
  "Karumallur  Grama Panchayat",
  "Kavalangad  Grama Panchayat",
  "Keerampara  Grama Panchayat",
  "Keezhmad  Grama Panchayat",
  "Kizhakkambalam  Grama Panchayat",
  "Koovappady  Block Panchayat",
  "Koovappady  Grama Panchayat",
  "Kothamangalam  Block Panchayat",
  "Kothamangalam  Municipality",
  "Kottappady  Grama Panchayat",
  "Kottuvally  Grama Panchayat",
  "Kumbalam  Grama Panchayat",
  "Kumbalanghi  Grama Panchayat",
  "Kunnathunad  Grama Panchayat",
  "Kunnukara  Grama Panchayat",
  "Kuttampuzha  Grama Panchayat",
  "Kuzhuppilly  Grama Panchayat",
  "MalayattoorNeeleswaram  Grama Panchayat",
  "Maneed  Grama Panchayat",
  "Manjalloor  Grama Panchayat",
  "Manjapra  Grama Panchayat",
  "Maradu  Municipality",
  "Marady  Grama Panchayat",
  "Mazhuvannoor  Grama Panchayat",
  "Mookkannur  Grama Panchayat",
  "Mudakuzha  Grama Panchayat",
  "Mulanthuruthy  Block Panchayat",
  "Mulanthuruthy  Grama Panchayat",
  "Mulavukad  Grama Panchayat",
  "Muvattupuzha  Block Panchayat",
  "Muvattupuzha  Municipality",
  "Narakal  Grama Panchayat",
  "Nayarambalam  Grama Panchayat",
  "Nedumbassery  Grama Panchayat",
  "Nellikuzhi  Grama Panchayat",
  "North Paravur  Municipality",
  "Okkal  Grama Panchayat",
  "Paingottoor  Grama Panchayat",
  "Paipra  Grama Panchayat",
  "Palakuzha  Grama Panchayat",
  "Pallarimangalam  Grama Panchayat",
  "Pallippuram  Grama Panchayat",
  "Palluruthy  Block Panchayat",
  "Pampakuda  Block Panchayat",
  "Pampakuda  Grama Panchayat",
  "Parakkadavu  Block Panchayat",
  "Parakkadavu  Grama Panchayat",
  "Paravur  Block Panchayat",
  "Perumbavoor  Municipality",
  "Pindimana  Grama Panchayat",
  "Poothrikka  Grama Panchayat",
  "Pothanicad  Grama Panchayat",
  "Puthenvelikkara  Grama Panchayat",
  "Ramamangalam  Grama Panchayat",
  "Rayamangalam  Grama Panchayat",
  "Sreemoolanagaram  Grama Panchayat",
  "Thirumarady  Grama Panchayat",
  "Thiruvaniyoor  Grama Panchayat",
  "Thrikkakara Municipality",
  "Thuravoor  Grama Panchayat",
  "Tripunithura  Municipality",
  "Udayamperoor  Grama Panchayat",
  "Vadakkekkara  Grama Panchayat",
  "VadavucodePuthencruz  Grama Panchayat",
  "Vadavucode  Block Panchayat",
  "Valakom  Grama Panchayat",
  "Varappetty  Grama Panchayat",
  "Varapuzha  Grama Panchayat",
  "Vazhakulam  Block Panchayat",
  "Vazhakulam  Grama Panchayat",
  "Vengola  Grama Panchayat",
  "Vengoor  Grama Panchayat",
  "Vypin  Block Panchayat"].each do |d|
  Panchayat.create!(name: d, district_id: district.id)
end