fixup! add invite model
This commit is contained in:
parent
c20d1c1f5a
commit
4d8287ba79
@ -2,6 +2,7 @@ defmodule Cannery.Accounts.User do
|
||||
use Ecto.Schema
|
||||
import Ecto.Changeset
|
||||
alias Cannery.Accounts.{User}
|
||||
alias Cannery.Invites.{Invite}
|
||||
|
||||
@derive {Inspect, except: [:password]}
|
||||
@primary_key {:id, :binary_id, autogenerate: true}
|
||||
@ -13,6 +14,8 @@ defmodule Cannery.Accounts.User do
|
||||
field :confirmed_at, :naive_datetime
|
||||
field :role, Ecto.Enum, values: [:admin, :user], default: :user
|
||||
|
||||
has_many :invites, Invite, on_delete: :delete_all
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user