PhoenixKitManufacturing. Schemas. MachineTypeAssignment
(PhoenixKitManufacturing v0.2.0)
Copy Markdown
View Source
Join table for the many-to-many between machines and machine types.
Summary
Functions
Builds an insert changeset for a machine ↔ type assignment.
Types
Functions
@spec changeset(t(), map()) :: Ecto.Changeset.t()
Builds an insert changeset for a machine ↔ type assignment.
Casts the two FK columns + timestamps and wires assoc_constraint/2 on
both associations so an FK violation comes back as a clean
{:error, changeset} instead of raising Ecto.ConstraintError.