к
Size: a a a
к
jc
B
h
VY
VY
now()VY
AG
NaiveDateTime.utc_now() |> NaiveDateTime.truncate(:second)VY
VY
The fields generated by this macro will automatically be set to the current time when inserting and updating values in a repository.
VY
AG
timestamps()AG
timestamps = %{
inserted_at: NaiveDateTime.utc_now() |> NaiveDateTime.truncate(:second),
updated_at: NaiveDateTime.utc_now() |> NaiveDateTime.truncate(:second)
}
users = Enum.map(users, &Map.merge(&1, timestamps))
Repo.insert_all(User, users)VY
VY
AP
AD
Elixir, что-то есть живое?ŹR