Created
March 22, 2017 18:06
-
-
Save aleandros/c395ed82d0976cc907081e48ad6bdbb9 to your computer and use it in GitHub Desktop.
Ecto schema non-default conventions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.Bank do | |
use MyApp.Web, :model | |
@primary_key {:BankId, :id, autogenerate: true} # 1 | |
schema "bank" do # 2 | |
field :BankName, :string # 3 | |
timestamps(inserted_at: :BankCreateDate, # 4 | |
updated_at: :BankUpdateDate) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment