Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0001_initial.py 19KB

1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. # Generated by Django 4.1.7 on 2023-08-03 10:31
  2. import django.core.validators
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. class Migration(migrations.Migration):
  6. initial = True
  7. dependencies = [
  8. ('contenttypes', '0002_remove_content_type_name'),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name='Action',
  13. fields=[
  14. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  15. ('name', models.CharField(default='random Action', max_length=20)),
  16. ],
  17. options={
  18. 'abstract': False,
  19. 'base_manager_name': 'objects',
  20. },
  21. ),
  22. migrations.CreateModel(
  23. name='AttributeSet',
  24. fields=[
  25. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  26. ('experience', models.IntegerField(default=10)),
  27. ('reliability', models.IntegerField(default=10)),
  28. ('python', models.IntegerField(default=10)),
  29. ('javascript', models.IntegerField(default=10)),
  30. ('cpp', models.IntegerField(default=10)),
  31. ('management', models.IntegerField(default=10)),
  32. ],
  33. ),
  34. migrations.CreateModel(
  35. name='Company',
  36. fields=[
  37. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  38. ('name', models.CharField(default='A company', max_length=20)),
  39. ('user', models.CharField(default='default User', max_length=20)),
  40. ('customersatisfaction', models.IntegerField(default=100, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
  41. ('workersatisfaction', models.IntegerField(default=100, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
  42. ('money', models.IntegerField(default=100000)),
  43. ('actions', models.ManyToManyField(blank=True, to='mygame.action')),
  44. ],
  45. ),
  46. migrations.CreateModel(
  47. name='EngineeringModel',
  48. fields=[
  49. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  50. ('name', models.CharField(default='random EngineeringModel', max_length=30)),
  51. ('description', models.CharField(default='random description', max_length=200)),
  52. ('pros', models.CharField(default='random pro', max_length=100)),
  53. ('cons', models.CharField(default='random con', max_length=100)),
  54. ('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_%(app_label)s.%(class)s_set+', to='contenttypes.contenttype')),
  55. ],
  56. options={
  57. 'abstract': False,
  58. 'base_manager_name': 'objects',
  59. },
  60. ),
  61. migrations.CreateModel(
  62. name='Event',
  63. fields=[
  64. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  65. ('name', models.CharField(default='random Event', max_length=40)),
  66. ('description', models.CharField(default='Event description here', max_length=200)),
  67. ('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_%(app_label)s.%(class)s_set+', to='contenttypes.contenttype')),
  68. ],
  69. options={
  70. 'abstract': False,
  71. 'base_manager_name': 'objects',
  72. },
  73. ),
  74. migrations.CreateModel(
  75. name='Offer',
  76. fields=[
  77. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  78. ('amount', models.IntegerField(default=0)),
  79. ('company', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mygame.company')),
  80. ],
  81. ),
  82. migrations.CreateModel(
  83. name='OrderNames',
  84. fields=[
  85. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  86. ('name', models.CharField(default='no name', max_length=20)),
  87. ],
  88. ),
  89. migrations.CreateModel(
  90. name='Timer',
  91. fields=[
  92. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  93. ('timer', models.IntegerField(default=60)),
  94. ('remainingtimer', models.IntegerField(default=60)),
  95. ('running', models.BooleanField(default=False)),
  96. ],
  97. ),
  98. migrations.CreateModel(
  99. name='WorkerNames',
  100. fields=[
  101. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  102. ('name', models.CharField(default='no name', max_length=20)),
  103. ],
  104. ),
  105. migrations.CreateModel(
  106. name='ModelChaotic',
  107. fields=[
  108. ('engineeringmodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.engineeringmodel')),
  109. ],
  110. options={
  111. 'abstract': False,
  112. 'base_manager_name': 'objects',
  113. },
  114. bases=('mygame.engineeringmodel',),
  115. ),
  116. migrations.CreateModel(
  117. name='ModelScrum',
  118. fields=[
  119. ('engineeringmodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.engineeringmodel')),
  120. ],
  121. options={
  122. 'abstract': False,
  123. 'base_manager_name': 'objects',
  124. },
  125. bases=('mygame.engineeringmodel',),
  126. ),
  127. migrations.CreateModel(
  128. name='ModelSpiral',
  129. fields=[
  130. ('engineeringmodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.engineeringmodel')),
  131. ],
  132. options={
  133. 'abstract': False,
  134. 'base_manager_name': 'objects',
  135. },
  136. bases=('mygame.engineeringmodel',),
  137. ),
  138. migrations.CreateModel(
  139. name='ModelV',
  140. fields=[
  141. ('engineeringmodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.engineeringmodel')),
  142. ],
  143. options={
  144. 'abstract': False,
  145. 'base_manager_name': 'objects',
  146. },
  147. bases=('mygame.engineeringmodel',),
  148. ),
  149. migrations.CreateModel(
  150. name='ModelWaterfall',
  151. fields=[
  152. ('engineeringmodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.engineeringmodel')),
  153. ],
  154. options={
  155. 'abstract': False,
  156. 'base_manager_name': 'objects',
  157. },
  158. bases=('mygame.engineeringmodel',),
  159. ),
  160. migrations.CreateModel(
  161. name='SpecialOrder',
  162. fields=[
  163. ('event_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.event')),
  164. ('occuranceProbability', models.IntegerField(default=100, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
  165. ('occured', models.BooleanField(default=False)),
  166. ('hint', models.CharField(default='no hint', max_length=100)),
  167. ('validModels', models.ManyToManyField(blank=True, to='mygame.engineeringmodel')),
  168. ],
  169. options={
  170. 'abstract': False,
  171. 'base_manager_name': 'objects',
  172. },
  173. bases=('mygame.event',),
  174. ),
  175. migrations.CreateModel(
  176. name='Worker',
  177. fields=[
  178. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  179. ('name', models.CharField(default='random worker', max_length=20)),
  180. ('amplifyer', models.FloatField(default=1, validators=[django.core.validators.MinValueValidator(1.0), django.core.validators.MaxValueValidator(2.0)])),
  181. ('salary', models.IntegerField(default=1000)),
  182. ('status', models.IntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(3)])),
  183. ('lockedRounds', models.IntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)])),
  184. ('happyness', models.IntegerField(default=100, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(100)])),
  185. ('sick', models.BooleanField(default=False)),
  186. ('attributes', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mygame.attributeset')),
  187. ('skilledModels', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='mygame.engineeringmodel')),
  188. ],
  189. ),
  190. migrations.CreateModel(
  191. name='Order',
  192. fields=[
  193. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  194. ('name', models.CharField(default='random order', max_length=20)),
  195. ('profit', models.IntegerField(default=1000)),
  196. ('status', models.IntegerField(default=0, validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(1)])),
  197. ('maxRounds', models.IntegerField(default=5, validators=[django.core.validators.MinValueValidator(5), django.core.validators.MaxValueValidator(100)])),
  198. ('recalculated', models.BooleanField(default=False)),
  199. ('assignedWorkers', models.ManyToManyField(blank=True, to='mygame.worker')),
  200. ('engineeringModel', models.ForeignKey(blank=True, default=1, on_delete=django.db.models.deletion.DO_NOTHING, to='mygame.engineeringmodel')),
  201. ('offers', models.ManyToManyField(blank=True, related_name='order_offers', to='mygame.offer')),
  202. ('requiredWorkload', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mygame.attributeset')),
  203. ('specialorder', models.ForeignKey(blank=True, default=1, on_delete=django.db.models.deletion.CASCADE, to='mygame.specialorder')),
  204. ],
  205. ),
  206. migrations.AddField(
  207. model_name='offer',
  208. name='order',
  209. field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mygame.order'),
  210. ),
  211. migrations.CreateModel(
  212. name='Game',
  213. fields=[
  214. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  215. ('name', models.CharField(default='Game', max_length=20)),
  216. ('gamemaster', models.CharField(max_length=20)),
  217. ('maxRounds', models.IntegerField(default=10)),
  218. ('currentRound', models.IntegerField(default=1)),
  219. ('ordermarketsize', models.IntegerField(default=5)),
  220. ('acceptedOffers', models.ManyToManyField(blank=True, to='mygame.offer')),
  221. ('actionpool', models.ManyToManyField(to='mygame.action')),
  222. ('ordermarket', models.ManyToManyField(to='mygame.order')),
  223. ('participants', models.ManyToManyField(to='mygame.company')),
  224. ('timer', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mygame.timer')),
  225. ],
  226. ),
  227. migrations.AddField(
  228. model_name='company',
  229. name='events',
  230. field=models.ManyToManyField(blank=True, to='mygame.event'),
  231. ),
  232. migrations.AddField(
  233. model_name='company',
  234. name='orders',
  235. field=models.ManyToManyField(blank=True, to='mygame.order'),
  236. ),
  237. migrations.AddField(
  238. model_name='company',
  239. name='workermarket',
  240. field=models.ManyToManyField(related_name='workermarket', to='mygame.worker'),
  241. ),
  242. migrations.AddField(
  243. model_name='company',
  244. name='workers',
  245. field=models.ManyToManyField(blank=True, related_name='workers', to='mygame.worker'),
  246. ),
  247. migrations.AddField(
  248. model_name='action',
  249. name='actionmaker',
  250. field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mygame.company'),
  251. ),
  252. migrations.AddField(
  253. model_name='action',
  254. name='polymorphic_ctype',
  255. field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_%(app_label)s.%(class)s_set+', to='contenttypes.contenttype'),
  256. ),
  257. migrations.CreateModel(
  258. name='SOChangeRequirement',
  259. fields=[
  260. ('specialorder_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.specialorder')),
  261. ],
  262. options={
  263. 'abstract': False,
  264. 'base_manager_name': 'objects',
  265. },
  266. bases=('mygame.specialorder',),
  267. ),
  268. migrations.CreateModel(
  269. name='SOPrototyp',
  270. fields=[
  271. ('specialorder_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.specialorder')),
  272. ],
  273. options={
  274. 'abstract': False,
  275. 'base_manager_name': 'objects',
  276. },
  277. bases=('mygame.specialorder',),
  278. ),
  279. migrations.CreateModel(
  280. name='SORegularIncrementUpdates',
  281. fields=[
  282. ('specialorder_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.specialorder')),
  283. ],
  284. options={
  285. 'abstract': False,
  286. 'base_manager_name': 'objects',
  287. },
  288. bases=('mygame.specialorder',),
  289. ),
  290. migrations.CreateModel(
  291. name='EventOfferAccepted',
  292. fields=[
  293. ('event_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.event')),
  294. ('modelset', models.BooleanField(default=False)),
  295. ('order', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mygame.order')),
  296. ],
  297. options={
  298. 'abstract': False,
  299. 'base_manager_name': 'objects',
  300. },
  301. bases=('mygame.event',),
  302. ),
  303. migrations.CreateModel(
  304. name='ActionUnemploy',
  305. fields=[
  306. ('action_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.action')),
  307. ('worker', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='mygame.worker')),
  308. ],
  309. options={
  310. 'abstract': False,
  311. 'base_manager_name': 'objects',
  312. },
  313. bases=('mygame.action',),
  314. ),
  315. migrations.CreateModel(
  316. name='ActionTrain',
  317. fields=[
  318. ('action_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.action')),
  319. ('trainskill', models.CharField(default='empty', max_length=50)),
  320. ('cost', models.IntegerField(default=1000)),
  321. ('worker', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='mygame.worker')),
  322. ],
  323. options={
  324. 'abstract': False,
  325. 'base_manager_name': 'objects',
  326. },
  327. bases=('mygame.action',),
  328. ),
  329. migrations.CreateModel(
  330. name='ActionOffer',
  331. fields=[
  332. ('action_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.action')),
  333. ('amount', models.IntegerField(default=0)),
  334. ('order', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mygame.order')),
  335. ],
  336. options={
  337. 'abstract': False,
  338. 'base_manager_name': 'objects',
  339. },
  340. bases=('mygame.action',),
  341. ),
  342. migrations.CreateModel(
  343. name='ActionEmploy',
  344. fields=[
  345. ('action_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.action')),
  346. ('worker', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mygame.worker')),
  347. ],
  348. options={
  349. 'abstract': False,
  350. 'base_manager_name': 'objects',
  351. },
  352. bases=('mygame.action',),
  353. ),
  354. migrations.CreateModel(
  355. name='ActionCancelOrder',
  356. fields=[
  357. ('action_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.action')),
  358. ('order', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='mygame.order')),
  359. ],
  360. options={
  361. 'abstract': False,
  362. 'base_manager_name': 'objects',
  363. },
  364. bases=('mygame.action',),
  365. ),
  366. ]