source: main/eko-disco-specs/trunk/data.rst @ 10782

Last change on this file since 10782 was 10781, checked in by Henrik Bettermann, 11 years ago

Shorten use case titles.

Link data entities to use cases only if necessary/interesting.

File size: 11.4 KB
Line 
1
2.. |n0| replace:: n\ :sub:`0`
3.. |m0| replace:: m\ :sub:`0`
4
5.. _label-data-entities:
6
7Data Entities
8=============
9
10These are the data entities the new system is supposed to model. Each
11of these entities should be addable, editable, and removable as
12covered in more detail in :ref:`label-use-cases`.
13
14For each entity we give a short description to tell what it means,
15what its purpose is and in what regards (and how) it should be handled
16by the system. Again the more detailed actions on these entities
17provided by the system are described in the :ref:`label-use-cases`
18section.
19
20The data entities are sorted alphabetically, not by importance or
21similar. Used description terms should link to other respective
22entities/terms where possible.
23
24Each data entitiy description provides a list of use cases and other
25data entities connected. Connections to other data entities contain a
26relationship telling how many instances of the described entity are
27connected to how many instances of the related entity.
28
29The following relation types may occur (in both directions):
30
31  - 1:1 (one on one)
32  - n:1 (many on one)
33  - n:m (many on many)
34  - p:1 (many or none on one)
35  - p:q (many or none on many or none)
36  - p:n (many or none on many)
37  - b:1 (one or none on one)
38
39with
40
41  - n, m element of {1, 2, ...},
42  - p, q element of {0, 1, 2, ...}
43  - b element of {0, 1}
44
45Examples:
46
471:p service-contract relation means that each service
48offered can result in various contracts, but each contract is
49only based on one service.
50
51p:q useraccount-userrole relation means that each user account can have no role
52or several roles and each role can be assigned to no user account
53or several user accounts.
54
55Relations can always be read in two directions.
56
57.. _label-contact-address:
58
59Contact Address
60---------------
61
62A postal address.
63
64Connected to: :ref:`label-contact-data` (p:1)
65
66
67.. _label-contact-data:
68
69Contact Data
70------------
71
72The data neccessary to contact some :ref:`label-customer`,
73:ref:`label-officer` or similar entity. Contact data might contain several
74addresses, phone numbers, emails, etc.
75
76Connected to: :ref:`label-customer` (1:1),
77:ref:`label-contact-address` (1:p), :ref:`label-contact-email`
78(1:n), :ref:`label-contact-phone` (1:p)
79
80
81
82.. _label-contact-email:
83
84Contact Email
85-------------
86
87An email address with optional additional clear name. For email
88addresses we store some timestamp that indicates when the respective
89email address was last checked successfully (thus marking it a 'valid'
90one). No timestamp means, the email address has never been checked.
91
92Connected to: :ref:`label-contact-data` (n:1),
93:ref:`label-timestamp` (1:q),
94:ref:`label-user-account` (1:b)
95
96Used in the following use cases: :ref:`label-uc-user-add`,
97:ref:`label-uc-user-manage`, :ref:`label-uc-service-manage`
98
99
100.. _label-contact-phone:
101
102Contact Phone
103-------------
104
105Mobile phone number which is capable of receiving sms text messages.
106
107Connected to: :ref:`label-contact-data` (p:1)
108
109Used in the following use cases: :ref:`label-uc-user-add`,
110:ref:`label-uc-user-manage` , :ref:`label-uc-service-manage`
111
112
113.. _label-contract:
114
115Contract
116--------
117
118A contract is created whenever a :ref:`label-customer` orders some
119:ref:`label-service` from the system. It is always connected to a
120:ref:`label-customer` and a :ref:`label-service` .
121
122A contract is not necessarily written on paper and signed by
123people. Instead it is an abstraction used inside the system.
124
125It is always created from a :ref:`label-service`, which tells about
126the basic data, with additional parameters set that depend on the type
127of :ref:`label-service` ordered.
128
129Contracts can trigger :ref:`label-transaction`\ s. For instance if some
130:ref:`label-customer` orders a service. When the service charges
131become due, a respective :ref:`label-transaction` is triggered.
132
133Contracts can have multiple :ref:`label-supp-contract`\ s.
134
135Connected to: :ref:`label-service` (p:1), :ref:`label-customer` (p:1),
136:ref:`label-supp-contract` (1:p), :ref:`label-transaction` (1:p),
137:ref:`label-meter` (1:b)
138
139
140.. _label-customer:
141
142Customer
143--------
144
145A user data entity and beneficiary of :ref:`label-contract`\ s.
146
147Customers are added to the system by initial import (migration phase),
148being created by staff or can register themselves (self-registration)
149to the system.
150
151Each customer has a :ref:`label-user-account`.
152
153Customers have to provide :ref:`label-contact-data` and get
154:ref:`label-login-credentials` to login to the system.
155
156Once logged in, customers get a 'My Eko-Disco' page where they can
157
158- see their current orders
159
160- watch their consumption
161
162- order more services
163
164- handle contractual problems
165
166- get help if problems arise
167
168- retrieve bills
169
170- change their passwords
171
172Customers can order :ref:`label-service`\ s and pay these (kinds of
173payment depend on the type of service/good ordered and the available
174payment methods).
175
176Customers and their data can be managed by customers themselves (for
177instance when postal addresses change), and by officers.
178
179Connected to: :ref:`label-contract` (1:p),
180:ref:`label-contact-data` (1:1), :ref:`label-login-credentials` (1:1),
181:ref:`label-user-account` (b:1)
182
183
184.. _label-location:
185
186Location
187--------
188
189A real-world location. Used for instance for meters to store
190information about their place. The location of a meter does not necessarily
191correspond with one of the :ref:`label-contact-address`\ es.
192Locations can either be less formal, for instance describing a location
193in words, or very precise by using GPS data.
194
195Connected to: :ref:`label-meter` (1:p)
196
197
198.. _label-login-credentials:
199
200Login Credentials
201-----------------
202
203A set of username and password assigned to user accounts. Passwords are
204stored inside the system using strong cryptographic hash functions.
205
206Passwords can be reset on request.
207
208Connected to: :ref:`label-customer` (1:1), :ref:`label-user-account` (1:1)
209
210
211.. _label-meter:
212
213Meter
214-----
215
216A meter measures power consumption. It has a place where it is
217installed and might be connected to one or several contracts. For a
218given time a meter can be connected to one or zero contracts.
219
220Each meter has to provide a :ref:`label-location` that tells, where it
221is installed.
222
223Meters also contain a history of meter values
224(:ref:`label-meter-value`), which is basically a list of meter values
225at a given time.
226
227Connected to: :ref:`label-contract` (b:1),
228:ref:`label-meter-value` (1:n), :ref:`label-location` (p:1)
229
230
231.. _label-meter-value:
232
233Meter Value
234-----------
235
236The value of a :ref:`label-meter` at a certain point in time
237(providing a :ref:`label-timestamp`) authorized by some user or device.
238
239It serves mainly for computing power consumption of
240:ref:`label-customer`\ s.
241
242When a new meter value is added to the system (the respective
243:ref:`label-meter` is 'updated'), the system also registers how the
244the new value was entered, i.e. by whom and when.
245
246The system will be prepared to collect meter values in two ways:
247
248a) (push-method): by being fed with respective data by authorized
249   users (officers)
250
251b) (pull-method): by polling dedicated hardware that provides the
252   neccessary interface (automatic remote-reading).
253
254The second choice requires appropriate hardware to be in place, which
255in detail is not part of this specs. The system will, however, be
256prepared to collect meter data from external devices.
257
258Connected to: :ref:`label-meter` (n:1), :ref:`label-timestamp` (1:1),
259:ref:`label-user-account` (p:1)
260
261
262.. _label-officer:
263
264Officer
265-------
266
267A user data entity of a staff member with certain permissions to manage
268portal data.
269
270Each officer has a :ref:`label-user-account`.
271
272Actors are called :ref:`Manager <label-actors>`\ s if they are officers with
273local managing permission.
274
275Connected to: :ref:`label-login-credentials` (1:1),
276:ref:`label-user-account` (b:1),
277:ref:`label-user-role` (1:p)
278
279
280.. _label-report:
281
282Report
283------
284
285Administrative report or list to give overviews over current state of
286business. Includes lists of customers sorted by various categories
287(type of contract, amount of fees paid, etc.), lists of services
288sorted by various categories, etc.
289
290Reports are generated as PDF documents and are available for download
291by authorized users.
292
293Connected to: (almost everything else)
294
295
296.. _label-service:
297
298Service
299-------
300
301The system will provide different services to
302:ref:`label-customer`\ s. These can have arbitrary forms, including
303one-time services (like installation of meters) and open-ended
304long-time services (like delivering power based on contract). Services
305are managable by staff like goods offered in a shop.
306
307Services define the conditions under which they can be ordered by
308:ref:`label-customer`\ s, including prices, runtimes, etc.
309
310Services also serve as factories for :ref:`label-contract`\ s.
311
312Connected to: :ref:`label-contract` (1:p)
313
314
315.. _label-supp-contract:
316
317Supplementary Contract
318----------------------
319
320A supplementary contract always belongs to some already existing
321:ref:`label-contract` but comes with an own set of
322parameters. A typical supplementary contract materialises if a customer
323orders an amount of electrical energy on the bases of a 'main' contract
324achieved between the customer and the distribution company.
325The parent contract for instance may guarantee a special price
326per kilowatt hour of electrical energy.
327
328Supplementary contracts are created by :ref:`label-contract`\ s.
329
330Connected to: :ref:`label-contract` (p:1),
331:ref:`label-service` (p:1), :ref:`label-customer` (p:1),
332:ref:`label-transaction` (1:p)
333
334
335.. _label-timestamp:
336
337Timestamp
338---------
339
340A timestamp can be a calendar date or a calendar date plus some day
341time.
342
343The system will internally use UTC-based timestamps only to minimize
344ambiguities. In menus, frontends, etc. timestamps are displayed in
345local Lagos time.
346
347Connected to: :ref:`label-meter-value` (1:1),
348:ref:`label-contact-email` (p:1)
349
350
351.. _label-transaction:
352
353Transaction
354-----------
355
356A transaction is some business-relevant action taken. A transaction
357means basically, that something happened, that leads to increased or
358decreased customer accounts. Normally this is something like a
359payment, some service order or similar.
360
361Transactions do always belong to one certain customer account. They
362also contain some amount of money which is thereby transfered to or
363from a customer's account. They also always reference a service which
364is consumed, purchased, or (pre-)paid by the respective customer.
365
366Connected to: :ref:`label-customer` (p:1), :ref:`label-service`
367(p:1), :ref:`label-contract` (p:1)
368
369
370.. _label-user-account:
371
372User Account
373------------
374
375A user account is a set of user data and :ref:`label-login-credentials`
376which allows a user (agent) to authenticate against the system and
377let the system store some information required for user handling,
378such as real name, email address and/or mobile phone number. An email
379address and/or phone number ensures that the user can be contacted
380electronically by the system.
381
382:ref:`label-user-role`\s are assigned to user accounts and managed by the
383system to grant authorization for the various views of the portal.
384Real-world officers (staff members) and customers are different to the
385system as they will get different roles. Also anonymous users
386(users without user account) are accepted by the system to provide
387marketing pages, service offers, etc.
388
389Users can be blocked or removed from the system.
390
391Connected to: :ref:`label-login-credentials` (1:1),
392:ref:`label-customer` (1:b),
393:ref:`label-user-role` (p:q),
394:ref:`label-contact-email` (b:1)
395
396
397.. _label-user-role:
398
399User Role
400---------
401
402A set of permissions assigned to a group of :ref:`label-user-account`\ s.
403
404Connected to: :ref:`label-user-account` (p:q)
405
Note: See TracBrowser for help on using the repository browser.