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

Last change on this file since 10778 was 10777, checked in by Henrik Bettermann, 12 years ago

Shorten description.

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