fixup! add invite model

This commit is contained in:
shibao 2021-09-10 00:25:14 -04:00 committed by oliviasculley
parent c20d1c1f5a
commit 4d8287ba79

View File

@ -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