-record(ts_user, {
    username,
    pwd,
    pwd_salt,
    name,
    email,
    join_date
}).

% ts_user.ext_data format is
%  [{key, val}, {key, val}]
%
% Valid key/value pairs are:
% 
% * last_timeline/TimelineId
%   
%   list() representing a timeline owned by this user
%
% * entry_exclusions/EntryExclusions
% 
%   list() of regular expressions to be excluded from display, seperated by '|'

-record(ts_timeline, {
    ref,    % {username, timelineid}
    created,% {{year, month, day}, {hour, minute, second}}
    desc
}).

-record(ts_entry, {
    ref,        % {username, timelineid, entryid}
    uuid,       % UUID for this entry across all implementations and copies of
                % this timeline.
    timestamp,  % gregorian seconds
    mark,       % String description of entry
    notes       % String with further notes about the entry
}).

-record(ts_api_session, {
    username
}).

% extensible data for arbitrary entities
-record(ts_ext_data, {
    ref,    % {ref, key}: reference with item ref and property key
    value   % value
}).
%-record(ts_session, {
    %session_id,
    %expires,
    %username
