@@ -8,28 +8,32 @@ defmodule Memorable.Data.Collection do
88 Collections are comprised of the following fields:
99 - `id`: An [ID](`t:Memorable.Util.id/0`) representing the collection
1010 - `name`: The human-readable name of the collection
11- - `creation_date `: A `DateTime` representing the time at which the collection was created.
11+ - `created_datetime `: A `DateTime` representing the time at which the collection was created.
1212 """
1313 @ moduledoc since: "1.0.0"
1414
15- @ derive { Inspect , only: [ :id , :name , :creation_date ] }
16- use Memento.Table , attributes: [ :id , :name , :creation_date ]
15+ @ derive { Inspect , only: [ :id , :name , :created_datetime ] }
16+ use Memento.Table , attributes: [ :id , :name , :created_datetime ]
1717
18- @ type t :: % __MODULE__ { id: Memorable.Util . id ( ) , name: String . t ( ) , creation_date: DateTime . t ( ) }
18+ @ type t :: % __MODULE__ {
19+ id: Memorable.Util . id ( ) ,
20+ name: String . t ( ) ,
21+ created_datetime: DateTime . t ( )
22+ }
1923
2024 @ doc """
2125 Creates a new collection.
2226
2327 Accepts the name to give the collection, and creates a new collection with a randomly-generated ID, and the current
24- time as the `creation_date `.
28+ time as the `created_datetime `.
2529 """
2630 @ doc since: "1.0.0"
2731 @ spec new ( String . t ( ) ) :: t ( )
2832 def new ( name ) do
2933 % __MODULE__ {
3034 id: Memorable.Util . generate_id ( ) ,
3135 name: name ,
32- creation_date : DateTime . utc_now ( )
36+ created_datetime : DateTime . utc_now ( )
3337 }
3438 end
3539
0 commit comments