refactor(elixir): remove unused is_active field

from storage location
This commit is contained in:
Schuwi
2025-09-17 23:13:45 +02:00
parent 6a1122c3be
commit 5a1775e836
4 changed files with 286 additions and 149 deletions

View File

@@ -15,7 +15,6 @@ defmodule ComponentsElixir.Inventory.StorageLocation do
field :name, :string
field :description, :string
field :apriltag_id, :integer
field :is_active, :boolean, default: true
# Computed/virtual fields - not stored in database
field :level, :integer, virtual: true
@@ -32,7 +31,7 @@ defmodule ComponentsElixir.Inventory.StorageLocation do
@doc false
def changeset(storage_location, attrs) do
storage_location
|> cast(attrs, [:name, :description, :parent_id, :is_active, :apriltag_id])
|> cast(attrs, [:name, :description, :parent_id, :apriltag_id])
|> validate_required([:name])
|> validate_length(:name, min: 1, max: 100)
|> validate_length(:description, max: 500)