mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
datamodell and start drawing creation process
This commit is contained in:
parent
b8e49d42fa
commit
87d8d84e9a
@ -10,10 +10,9 @@ In der Admin-Übersicht wird es zusätzliche Navigations- bzw. Menüpunkte geben
|
||||
|
||||

|
||||
|
||||
|
||||
## Contribution erfassen
|
||||
|
||||
Bei der Erfassung einer Contribution wird die Kategorie, ein eindeutiger Name, eine Beschreibung der Contribution und der Betrag eingegeben.
|
||||
Bei der Erfassung einer Contribution wird die Kategorie, ein Name, eine Beschreibung der Contribution und der Betrag eingegeben.
|
||||
|
||||
Der Gültigkeitsstart wird als Default mit dem aktuellen Erfassungszeitpunkt vorbelegt, wobei das Gültigkeitsende leer bleibt und damit als endlos gültig definiert wird. Mit Eingabe eines Start- und/oder Endezeitpunktes kann aber ein konkreter Gültigkeitszeitraum erfasst werden.
|
||||
|
||||
@ -23,10 +22,8 @@ Wie häufig ein User für diese Contribution eine Schöpfung gutgeschrieben beko
|
||||
|
||||
Ob die Contribution über einen versendeten Link bzw. QR-Code geschöpft werden kann, wird mittels der Auswahl "Versenden möglich als" bestimmt.
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
Für die Schöpfung der Contribution können weitere Regeln definiert werden:
|
||||
|
||||
* Gesamt - max. Anzahl Schöpfungen: bestimmt die maximale Anzahl der möglichen Schöpfungen über alle User dieser Community. Sobald diese Anzahl an Schöpfungen erreicht ist, werden alle weiteren eingehenden Schöpfungsanfragen für diese Contribution -egal ob per Links, per QR-Code oder User-Online-Erfassung mit einer entsprechend aussagekräftigen Fehlermeldung abgelehnt.
|
||||
@ -37,14 +34,19 @@ Für die Schöpfung der Contribution können weitere Regeln definiert werden:
|
||||
|
||||

|
||||
|
||||
|
||||
## Datenbank-Modell
|
||||
|
||||
### Ausgangsmodell
|
||||
|
||||
Das nachfolgende Bild zeigt das Datenmodell vor der Einführung und Migration auf Contributions.
|
||||
|
||||

|
||||
|
||||
### Datenbank-Änderungen
|
||||
|
||||
### Contributions - Table
|
||||
#### neue Tabellen
|
||||
|
||||
##### Contributions - Table
|
||||
|
||||
| Name | Typ | Nullable | Default | Kommentar |
|
||||
| --------------------------- | ------------ | :------: | :------------: | -------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@ -64,32 +66,59 @@ Für die Schöpfung der Contribution können weitere Regeln definiert werden:
|
||||
| MinGapHours | INT UNSIGNED | | NULL | |
|
||||
| CreatedAt | DATETIME | | NOW | |
|
||||
| Deleted | BOOL | NOT NULL | FALSE | |
|
||||
| Link | varchar(24) | | NULL | |
|
||||
| LinkEnabled | BOOL | | NULL | |
|
||||
|
||||
##### PendingActivities -Table
|
||||
|
||||
### ContributionCategories -Table
|
||||
| Name | Typ | Nullable | Default | Kommentar |
|
||||
| -------------- | ------------ | -------- | -------------- | -------------------------------------------------------------------------------- |
|
||||
| ID | INT UNSIGNED | NOT NULL | auto increment | PrimaryKey |
|
||||
| Name | varchar(100) | NOT NULL | | short Naming of activity |
|
||||
| Memo | varchar(255) | NOT NULL | | full and detailed description of activities |
|
||||
| Amount | DECIMAL | NOT NULL | | the amount of GDD for this activity |
|
||||
| ActivityDate | DATETIME | | NULL | the date, when the activity was done |
|
||||
| UserID | INT UNSIGNED | NOT NULL | | the user, who wants to get GDD for his activity |
|
||||
| CapturedAt | DATETIME | NOT NULL | NOW | the date, when this entry was captured and stored in database |
|
||||
| ContributionID | INT UNSIGNED | | NULL | contribution, on which this activity base on |
|
||||
| ModeratorID | INT UNSIGNED | | NULL | userID of Moderator/Admin, who confirms the activity |
|
||||
| ConfirmedAt | DATETIME | | NULL | date, when moderator has confirmed the activity |
|
||||
| BookedAt | DATETIME | | NULL | date, when the system has booked the amount of the activity on the users account |
|
||||
|
||||
| Name | Typ | Nullable | Default | Kommentar |
|
||||
| ---------------------- | ------------ | -------- | -------------- | ----------- |
|
||||
| ID | INT UNSIGNED | NOT NULL | auto increment | PrimaryKey |
|
||||
| Name | varchar(100) | NOT NULL | | unique Name |
|
||||
| Description | varchar(255) | | | |
|
||||
| Active | BOOL | NOT NULL | TRUE | |
|
||||
| ContributionCategoryID | INT UNSIGNED | | NULL | |
|
||||
#### zu migrierende Tabellen
|
||||
|
||||
##### Tabelle admin_pending-creations
|
||||
|
||||
Diese Tabelle wird im Rahmen dieses UseCase migriert in die neue Tabelle PendingActivies...
|
||||
|
||||
| Quell-Spalte | Migration | Ziel-Spalte | Beschreibung |
|
||||
| ------------ | --------- | -------------- | ---------------------------------------------------------- |
|
||||
| id | keine | id | auto inkrement des PK |
|
||||
| userId | copy | UserID | |
|
||||
| created | copy | CapturedAt | |
|
||||
| date | copy | ActivityDate | |
|
||||
| memo | copy | Memo | |
|
||||
| amount | copy | Amount | |
|
||||
| moderator | copy | ModeratorID | |
|
||||
| | | Name | neu mit Contributions |
|
||||
| | | ContributionID | neu mit Contributions |
|
||||
| | | ConfirmedAt | neu mit Erfassung der Contributions von Elopage in Gradido |
|
||||
| | | BookedAt | neu mit Erfassung der Contributions von Elopage in Gradido |
|
||||
|
||||
...und kann nach Übernahme der Daten in die neue Tabelle gelöscht werden.
|
||||
|
||||
### Zielmodell
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
CREATE TABLE CommunityContributions (
|
||||
CREATE TABLE gradido_community.Contributions (
|
||||
Id INT UNSIGNED auto_increment NOT NULL,
|
||||
Name varchar(100) NOT NULL,
|
||||
Description varchar(255) NULL,
|
||||
ContributionCategoryID INT UNSIGNED NULL,
|
||||
Description varchar(255) NOT NULL,
|
||||
ValidFrom DATETIME DEFAULT NOW NOT NULL,
|
||||
ValidTo DATETIME DEFAULT null NULL,
|
||||
Amount DECIMAL NOT NULL,
|
||||
`Cycle` ENUM DEFAULT ONCE NOT NULL COMMENT 'ONCE, HOUR, 4HOUR, 8HOUR, HALFDAY, DAY, WEEK, 2WEEKS, MONTH, QUARTER, HALFYEAR, YEAR',
|
||||
Cycle ENUM DEFAULT ONCE NOT NULL COMMENT 'ONCE, HOUR, 4HOUR, 8HOUR, HALFDAY, DAY, WEEK, 2WEEKS, MONTH, QUARTER, HALFYEAR, YEAR',
|
||||
MaxPerCycle INT UNSIGNED DEFAULT 1 NOT NULL,
|
||||
AbelToSend ENUM DEFAULT NO NOT NULL COMMENT 'NO, LINK, QRCODE',
|
||||
MaxAmountPerMonth DECIMAL DEFAULT null NULL,
|
||||
@ -97,20 +126,31 @@ TotalMaxCountOfContribution INT UNSIGNED DEFAULT null NULL,
|
||||
MaxAccountBalance DECIMAL DEFAULT null NULL,
|
||||
MinGapHours INT UNSIGNED DEFAULT null NULL,
|
||||
CreatedAt DATETIME DEFAULT NOW NULL,
|
||||
Deleted BOOL DEFAULT FALSE NOT NULL
|
||||
Deleted BOOL DEFAULT FALSE NOT NULL,
|
||||
Link varchar(24) DEFAULT null NULL,
|
||||
LinkEnabled BOOL DEFAULT null NULL,
|
||||
CONSTRAINT Contributions_PK PRIMARY KEY (Id)
|
||||
)
|
||||
ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb4
|
||||
COLLATE=utf8mb4_unicode_ci;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE gradido_community.ContributionCategory (
|
||||
ID INT UNSIGNED auto_increment NOT NULL,
|
||||
CREATE TABLE gradido_community.PendingActivities (
|
||||
Id INT UNSIGNED auto_increment NOT NULL,
|
||||
Name varchar(100) NOT NULL,
|
||||
Description varchar(255) NULL,
|
||||
Active BOOL DEFAULT TRUE NOT NULL,
|
||||
ContributionCategoryID INT UNSIGNED NULL
|
||||
Memo varchar(255) NULL,
|
||||
Amount DECIMAL NULL,
|
||||
AcitivtyDate DATETIME NULL,
|
||||
UserID INT UNSIGNED NOT NULL,
|
||||
CreatedAt DATETIME DEFAULT NOW NULL,
|
||||
ContributionID INT UNSIGNED NULL,
|
||||
ModeratorID INT UNSIGNED NULL COMMENT 'userID of moderator',
|
||||
ConfirmedAt DATETIME NULL,
|
||||
BookedAt DATETIME NULL,
|
||||
CONSTRAINT CreationActivities_PK PRIMARY KEY (Id),
|
||||
CONSTRAINT PendingActivities_FK FOREIGN KEY (UserID) REFERENCES gradido_community.users(id),
|
||||
CONSTRAINT PendingActivities_FK_1 FOREIGN KEY (ContributionID) REFERENCES gradido_community.Contributions(Id),
|
||||
CONSTRAINT PendingActivities_FK_2 FOREIGN KEY (ModeratorID) REFERENCES gradido_community.users(id)
|
||||
)
|
||||
ENGINE=InnoDB
|
||||
DEFAULT CHARSET=utf8mb4
|
||||
|
||||
@ -0,0 +1,126 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="-Bvenr9G4hMm7q4_ZwMA" name="Seite-1">
|
||||
<mxGraphModel dx="1185" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="2336" pageHeight="1654" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="6" value="EloPage" style="rounded=0;whiteSpace=wrap;html=1;fontSize=24;fillColor=#fff2cc;strokeColor=#d6b656;verticalAlign=top;align=center;" vertex="1" parent="1">
|
||||
<mxGeometry x="40" y="80" width="320" height="120" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="2" value="interactive Confirmation and booking of Creations" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=24;" vertex="1" parent="1">
|
||||
<mxGeometry x="40" y="10" width="1080" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="3" value="automatic Confirmation and booking of Creations" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=24;" vertex="1" parent="1">
|
||||
<mxGeometry x="1200" y="10" width="1080" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="4" value="" style="endArrow=none;html=1;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="1160" y="1650" as="sourcePoint"/>
|
||||
<mxPoint x="1160" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="5" value="User erfasst Activity" style="rounded=1;whiteSpace=wrap;html=1;fontSize=20;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
|
||||
<mxGeometry x="80" y="140" width="240" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="7" value="Gradido" style="rounded=0;whiteSpace=wrap;html=1;fontSize=24;fillColor=#d5e8d4;strokeColor=#82b366;verticalAlign=top;align=center;" vertex="1" parent="1">
|
||||
<mxGeometry x="40" y="210" width="1080" height="150" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="21" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontSize=24;" edge="1" parent="1" source="8" target="9">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="8" value="Moderator überträgt&nbsp; offene User-Activity aus EloPage" style="rounded=1;whiteSpace=wrap;html=1;fontSize=20;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
|
||||
<mxGeometry x="80" y="236" width="240" height="110" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="9" value="admin_pending_creations" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fontSize=20;size=0.05263157894736842;" vertex="1" parent="1">
|
||||
<mxGeometry x="400" y="261" width="380" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="29" value="" style="edgeStyle=none;html=1;fontSize=24;" edge="1" parent="1" source="10" target="9">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="10" value="users" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fontSize=20;size=0.05263157894736842;" vertex="1" parent="1">
|
||||
<mxGeometry x="880" y="261" width="170" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="12" value="" style="endArrow=none;dashed=1;html=1;fontSize=24;" edge="1" parent="1">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint y="440" as="sourcePoint"/>
|
||||
<mxPoint x="1160" y="440" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="13" value="IST-Process" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=24;" vertex="1" parent="1">
|
||||
<mxGeometry y="400" width="210" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="14" value="SOLL-Process" style="text;html=1;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=24;" vertex="1" parent="1">
|
||||
<mxGeometry y="450" width="210" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="15" value="Gradido" style="rounded=0;whiteSpace=wrap;html=1;fontSize=24;fillColor=#d5e8d4;strokeColor=#82b366;verticalAlign=top;align=center;" vertex="1" parent="1">
|
||||
<mxGeometry x="40" y="520" width="1080" height="890" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="18" value="PendingActivities" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fontSize=20;size=0.05263157894736842;" vertex="1" parent="1">
|
||||
<mxGeometry x="400" y="570" width="380" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="30" value="" style="edgeStyle=none;html=1;fontSize=24;" edge="1" parent="1" source="19" target="18">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="19" value="users" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fontSize=20;size=0.05263157894736842;" vertex="1" parent="1">
|
||||
<mxGeometry x="880" y="570" width="170" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="22" value="" style="edgeStyle=none;html=1;fontSize=24;" edge="1" parent="1" source="20" target="18">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="20" value="User erfasst Activity" style="rounded=1;whiteSpace=wrap;html=1;fontSize=20;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
|
||||
<mxGeometry x="90" y="580" width="240" height="40" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="36" value="" style="edgeStyle=none;html=1;fontSize=24;" edge="1" parent="1" source="23" target="28">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="23" value="Moderator sucht unbestätigte PendingActivies" style="rounded=1;whiteSpace=wrap;html=1;fontSize=20;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
|
||||
<mxGeometry x="90" y="670" width="240" height="110" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="27" value="" style="edgeStyle=none;html=1;fontSize=24;" edge="1" parent="1" source="25" target="23">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="25" value="PendingActivities<br style="font-size: 20px"><font style="font-size: 14px">ConfirmedAt == NULL &amp;&amp; ContributionID == NULL</font>" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fontSize=20;size=0.05263157894736842;" vertex="1" parent="1">
|
||||
<mxGeometry x="400" y="695" width="380" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="32" value="" style="edgeStyle=none;html=1;fontSize=24;" edge="1" parent="1" source="28" target="31">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="43" value="" style="edgeStyle=none;html=1;fontSize=14;" edge="1" parent="1" source="28" target="34">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="28" value="Moderator bestätigt PendingActivity" style="rounded=1;whiteSpace=wrap;html=1;fontSize=20;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
|
||||
<mxGeometry x="90" y="800" width="240" height="110" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="31" value="PendingActivities<br style="font-size: 20px"><div style="text-align: left"><span style="font-size: 14px">ConfirmedAt = NOW</span></div><span style="font-size: 14px ; line-height: 0.8"><div style="text-align: left"><span>ModeratorID = own userID</span></div></span>" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fontSize=20;size=0.05263157894736842;" vertex="1" parent="1">
|
||||
<mxGeometry x="400" y="810" width="380" height="90" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="34" value="System liest PendingActivity und prüft fachliche Schöpfungsregeln" style="rounded=1;whiteSpace=wrap;html=1;fontSize=20;fillColor=#008a00;strokeColor=#005700;fontColor=#ffffff;" vertex="1" parent="1">
|
||||
<mxGeometry x="90" y="970" width="240" height="140" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="37" value="" style="edgeStyle=none;html=1;fontSize=12;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="35" target="34">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="35" value="PendingActivites" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fontSize=20;size=0.05263157894736842;" vertex="1" parent="1">
|
||||
<mxGeometry x="400" y="960" width="380" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="38" value="" style="edgeStyle=none;html=1;fontSize=24;" edge="1" parent="1" source="39">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="780" y="990" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="41" style="edgeStyle=none;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fontSize=12;" edge="1" parent="1" source="39" target="40">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="39" value="users" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fontSize=20;size=0.05263157894736842;" vertex="1" parent="1">
|
||||
<mxGeometry x="880" y="990" width="170" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="42" style="edgeStyle=none;html=1;fontSize=12;" edge="1" parent="1" source="40" target="34">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="40" value="Transactions" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;fontSize=20;size=0.05263157894736842;" vertex="1" parent="1">
|
||||
<mxGeometry x="400" y="1030" width="380" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 75 KiB |
Loading…
x
Reference in New Issue
Block a user