Storing DB template data in Files & copy to DB on registration
Hi there,
I'm just looking for a little feedback/reassurance in my thinking on how to complete the first part of a project I have to complete for my company.
Long project story as short as possible:
A school instructor can run simulations. Students join and are assigned characters to roleplay through modules (book chapters) and complete activities such as live roleplaying chats through each module. There are already 2 simulations that this project was based off of (the content is already written for the sim).
A simulation has characters which belong to a group/side. Since the one simulation is a U.S. civil war simulation, an example would be: characters are people who had some sort of influence on the civil war, and the groups/sides are the North and South.
What would I like feedback on?
Is this the best way to pass around data that can slightly modified per simulation?
Instructors can either create a base template or start with a pre-made simulation template. They can use these templates as the starting point of the simulation. So after an instructor signs up and they click start new simulation on the pre-made template the following happens:
- They enter simulation data such as name, starting/ending dates etc.
- It seeds the database with the new simulation data such as: characters/groups, activities/module (chapter) content.
Creating a new template would generate the folders and files to store the template data. After they are finished creating the content, it will be submitted for review and published. Once published the content cannot be edited but a new template version can me made from that original one.
Folder Structure could look like:
./storage/app/templates/civil-war-sim
./storage/app/templates/civil-war-sim/135151361(timestamp)
./storage/app/templates/civil-war-sim/135151361/groups
./storage/app/templates/civil-war-sim/135151361/groups/characters
./storage/app/templates/civil-war-sim/135151361/groups/characters/abraham-lincoln
./storage/app/templates/civil-war-sim/135151361/groups/characters/abraham-lincoln/description.md
./storage/app/templates/civil-war-sim/135151361/groups/characters/abraham-lincoln/character-instructions.md
./storage/app/templates/civil-war-sim/135151361/groups/characters/abraham-lincoln/CharacterSeeder.php
Thanks,
Erik
Please or to participate in this conversation.