Skip to content

Instantly share code, notes, and snippets.

@samueljmurray
Last active March 27, 2017 10:53
Show Gist options
  • Save samueljmurray/a4cafded0ac9bbe118cc852f532d512f to your computer and use it in GitHub Desktop.
Save samueljmurray/a4cafded0ac9bbe118cc852f532d512f to your computer and use it in GitHub Desktop.
User schema
schema "users" do
field :phone_number, :string
field :first_name, :string
field :last_name, :string
field :display_name, :string
field :employee_id, :string
field :disabled_at, Ecto.DateTime
field :disabled, :boolean, virtual: true
has_one :user_auth, UserAuth, on_replace: :delete
belongs_to :department, Department
timestamps
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment