add node data to seed and wipe scripts
This commit is contained in:
parent
9b24fddec1
commit
6a1f44e112
2 changed files with 17 additions and 0 deletions
|
|
@ -7,8 +7,24 @@ $texts = [
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$nodes = [
|
||||||
|
[
|
||||||
|
'id' => 0,
|
||||||
|
'title' => 'Chapter 1',
|
||||||
|
'textId' => 0,
|
||||||
|
'parentNodeId' => null,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'id' => 1,
|
||||||
|
'title' => 'Section 1.1',
|
||||||
|
'textId' => 0,
|
||||||
|
'parentNodeId' => 0,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
$fileDataMap = [
|
$fileDataMap = [
|
||||||
'texts.json' => $texts,
|
'texts.json' => $texts,
|
||||||
|
'nodes.json' => $nodes,
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($fileDataMap as $file => $data) {
|
foreach ($fileDataMap as $file => $data) {
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
$files = [
|
$files = [
|
||||||
'texts.json',
|
'texts.json',
|
||||||
|
'nodes.json',
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue