make bullet type rifle/pistol type-only field

This commit is contained in:
2023-04-10 20:08:37 -04:00
parent 17bfe1a987
commit 2b81978adb
21 changed files with 251 additions and 246 deletions

View File

@ -55,8 +55,6 @@ defmodule Cannery.Ammo.Type do
field :class, Ecto.Enum, values: [:rifle, :shotgun, :pistol]
# common fields
# https://shootersreference.com/reloadingdata/bullet_abbreviations/
field :bullet_type, :string
field :bullet_core, :string
# also gauge for shotguns
field :caliber, :string
@ -75,6 +73,8 @@ defmodule Cannery.Ammo.Type do
field :corrosive, :boolean, default: false
# rifle/pistol fields
# https://shootersreference.com/reloadingdata/bullet_abbreviations/
field :bullet_type, :string
field :cartridge, :string
field :jacket_type, :string
field :powder_grains_per_charge, :integer