Schema for manufacturing machines (the machines reference book).
A machine is a piece of production equipment: a CNC mill, a press, a
laser cutter, etc. Machines are categorized by many-to-many
MachineType links, so a single machine can carry several type tags.
The freeform metadata JSONB column holds passport/spec fields that are
not yet modeled as columns (power rating, working area, commissioning
date, maintenance schedule…), so early iterations don't need a migration
for every new attribute. data holds multilang translations.
Summary
Types
@type t() :: %PhoenixKitManufacturing.Schemas.Machine{ __meta__: term(), code: term(), data: term(), description: term(), inserted_at: term(), location_note: term(), machine_type_assignments: term(), machine_types: term(), manufacturer: term(), metadata: term(), name: term(), serial_number: term(), status: term(), updated_at: term(), uuid: term() }
Functions
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Builds a changeset for a machine.
@spec statuses() :: [String.t()]
The list of valid status values.