2021-09-01 12:43:55 +00:00
|
|
|
defmodule ArchitexWeb.Client.Request.Kick do
|
|
|
|
use ArchitexWeb.Request
|
2021-08-26 12:32:24 +00:00
|
|
|
|
|
|
|
@type t :: %__MODULE__{
|
|
|
|
user_id: String.t(),
|
|
|
|
reason: String.t() | nil
|
|
|
|
}
|
|
|
|
|
|
|
|
@primary_key false
|
|
|
|
embedded_schema do
|
|
|
|
field :user_id, :string
|
|
|
|
field :reason, :string
|
|
|
|
end
|
|
|
|
|
|
|
|
def changeset(data, params) do
|
|
|
|
data
|
|
|
|
|> cast(params, [:user_id, :reason])
|
|
|
|
|> validate_required([:user_id])
|
|
|
|
end
|
|
|
|
end
|