defmodule Spell do
  use Ecto.Schema

  @primary_key {:id, :integer, autogenerate: false}
  schema "Spell" do
    field(:school, :integer)
    field(:category, :integer)
    field(:cast_ui, :integer)
    field(:dispel_type, :integer)
    field(:mechanic, :integer)
    field(:attributes, :integer)
    field(:attributes_ex1, :integer)
    field(:attributes_ex2, :integer)
    field(:attributes_ex3, :integer)
    field(:attributes_ex4, :integer)
    field(:shapeshift_mask, :integer)
    field(:shapeshift_exclude, :integer)
    field(:targets, :integer)
    field(:target_creature_type, :integer)
    field(:requires_spell_focus, :integer)
    field(:caster_aura_state, :integer)
    field(:target_aura_state, :integer)
    field(:casting_time_index, :integer)
    field(:recovery_time, :integer)
    field(:category_recovery_time, :integer)
    field(:aura_interrupt_flags, :integer)
    field(:channel_interrupt_flags, :integer)
    field(:proc_type_mask, :integer)
    field(:proc_chance, :integer)
    field(:proc_charges, :integer)
    field(:max_level, :integer)
    field(:base_level, :integer)
    field(:spell_level, :integer)
    field(:duration, :integer)
    field(:power_type, :integer)
    field(:mana_cost, :integer)
    field(:mana_cost_per_level, :integer)
    field(:mana_cost_per_second, :integer)
    field(:mana_cost_per_second_per_level, :integer)
    field(:range, :integer)
    field(:speed, :float)
    field(:modal_next_spell, :integer)
    field(:stack_amount, :integer)
    field(:totem_0, :integer)
    field(:totem_1, :integer)
    field(:reagent_0, :integer)
    field(:reagent_1, :integer)
    field(:reagent_2, :integer)
    field(:reagent_3, :integer)
    field(:reagent_4, :integer)
    field(:reagent_5, :integer)
    field(:reagent_6, :integer)
    field(:reagent_7, :integer)
    field(:reagent_count_0, :integer)
    field(:reagent_count_1, :integer)
    field(:reagent_count_2, :integer)
    field(:reagent_count_3, :integer)
    field(:reagent_count_4, :integer)
    field(:reagent_count_5, :integer)
    field(:reagent_count_6, :integer)
    field(:reagent_count_7, :integer)
    field(:equipped_item_class, :integer)
    field(:equipped_item_subclass, :integer)
    field(:equipped_item_inventory_type, :integer)
    field(:effect_0, :integer)
    field(:effect_1, :integer)
    field(:effect_2, :integer)
    field(:effect_die_sides_0, :integer)
    field(:effect_die_sides_1, :integer)
    field(:effect_die_sides_2, :integer)
    field(:effect_base_dice_0, :integer)
    field(:effect_base_dice_1, :integer)
    field(:effect_base_dice_2, :integer)
    field(:effect_dice_per_level_0, :float)
    field(:effect_dice_per_level_1, :float)
    field(:effect_dice_per_level_2, :float)
    field(:effect_real_points_per_level_0, :float)
    field(:effect_real_points_per_level_1, :float)
    field(:effect_real_points_per_level_2, :float)
    field(:effect_base_points_0, :integer)
    field(:effect_base_points_1, :integer)
    field(:effect_base_points_2, :integer)
    field(:effect_mechanic_0, :integer)
    field(:effect_mechanic_1, :integer)
    field(:effect_mechanic_2, :integer)
    field(:implicit_target_a_0, :integer)
    field(:implicit_target_a_1, :integer)
    field(:implicit_target_a_2, :integer)
    field(:implicit_target_b_0, :integer)
    field(:implicit_target_b_1, :integer)
    field(:implicit_target_b_2, :integer)
    field(:effect_radius_0, :integer)
    field(:effect_radius_1, :integer)
    field(:effect_radius_2, :integer)
    field(:effect_aura_0, :integer)
    field(:effect_aura_1, :integer)
    field(:effect_aura_2, :integer)
    field(:effect_amplitude_0, :float)
    field(:effect_amplitude_1, :float)
    field(:effect_amplitude_2, :float)
    field(:effect_multiple_values_0, :float)
    field(:effect_multiple_values_1, :float)
    field(:effect_multiple_values_2, :float)
    field(:effect_chain_target_0, :integer)
    field(:effect_chain_target_1, :integer)
    field(:effect_chain_target_2, :integer)
    field(:effect_item_type_0, :integer)
    field(:effect_item_type_1, :integer)
    field(:effect_item_type_2, :integer)
    field(:effect_misc_value_0, :integer)
    field(:effect_misc_value_1, :integer)
    field(:effect_misc_value_2, :integer)
    field(:effect_trigger_spell_0, :integer)
    field(:effect_trigger_spell_1, :integer)
    field(:effect_trigger_spell_2, :integer)
    field(:effect_points_per_combo_0, :float)
    field(:effect_points_per_combo_1, :float)
    field(:effect_points_per_combo_2, :float)
    field(:spell_visual_0, :integer)
    field(:spell_visual_1, :integer)
    field(:spell_icon, :integer)
    field(:active_icon, :integer)
    field(:spell_priority, :integer)
    field(:unknown_flag, :integer)
    field(:name_en_gb, :string)
    field(:name_ko_kr, :string)
    field(:name_fr_fr, :string)
    field(:name_de_de, :string)
    field(:name_en_cn, :string)
    field(:name_en_tw, :string)
    field(:name_es_es, :string)
    field(:name_es_mx, :string)
    field(:name_flags, :string)
    field(:name_subtext_en_gb, :string)
    field(:name_subtext_ko_kr, :string)
    field(:name_subtext_fr_fr, :string)
    field(:name_subtext_de_de, :string)
    field(:name_subtext_en_cn, :string)
    field(:name_subtext_en_tw, :string)
    field(:name_subtext_es_es, :string)
    field(:name_subtext_es_mx, :string)
    field(:name_subtext_flags, :string)
    field(:description_en_gb, :string)
    field(:description_ko_kr, :string)
    field(:description_fr_fr, :string)
    field(:description_de_de, :string)
    field(:description_en_cn, :string)
    field(:description_en_tw, :string)
    field(:description_es_es, :string)
    field(:description_es_mx, :string)
    field(:description_flags, :string)
    field(:aura_description_en_gb, :string)
    field(:aura_description_ko_kr, :string)
    field(:aura_description_fr_fr, :string)
    field(:aura_description_de_de, :string)
    field(:aura_description_en_cn, :string)
    field(:aura_description_en_tw, :string)
    field(:aura_description_es_es, :string)
    field(:aura_description_es_mx, :string)
    field(:aura_description_flags, :string)
    field(:mana_cost_percent, :integer)
    field(:start_recovery_category, :integer)
    field(:start_recovery_time, :integer)
    field(:max_target_level, :integer)
    field(:spell_class_set, :integer)
    field(:spell_class_mask_0, :integer)
    field(:spell_class_mask_1, :integer)
    field(:max_targets, :integer)
    field(:defence_type, :integer)
    field(:prevention_type, :integer)
    field(:stance_bar_order, :integer)
    field(:damage_multiplier_0, :float)
    field(:damage_multiplier_1, :float)
    field(:damage_multiplier_2, :float)
    field(:min_faction, :integer)
    field(:min_reputation, :integer)
    field(:required_aura_vision, :integer)

    has_one(:spell_cast_time, SpellCastTimes, foreign_key: :id, references: :casting_time_index)
  end
end
