port over some more

This commit is contained in:
ra
2026-02-14 23:58:01 -07:00
parent 0222be36c5
commit 61176cd416
107 changed files with 9124 additions and 375 deletions

View File

@@ -0,0 +1,27 @@
defmodule Odinsea.Database.Schema.ReactorDrop do
@moduledoc """
Ecto schema for the reactordrops table.
Represents reactor (map object) drop tables.
"""
use Ecto.Schema
import Ecto.Changeset
@primary_key {:reactordropid, :id, autogenerate: true}
schema "reactordrops" do
field :reactorid, :integer
field :itemid, :integer
field :chance, :integer
field :questid, :integer, default: -1
end
@doc """
Changeset for creating/updating a reactor drop.
"""
def changeset(reactor_drop, attrs) do
reactor_drop
|> cast(attrs, [:reactorid, :itemid, :chance, :questid])
|> validate_required([:reactorid, :itemid, :chance])
end
end