169 lines
6.3 KiB
Python
169 lines
6.3 KiB
Python
|
# This is an auto-generated Django model module.
|
||
|
# You'll have to do the following manually to clean this up:
|
||
|
# * Rearrange models' order
|
||
|
# * Make sure each model has one field with primary_key=True
|
||
|
# * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
|
||
|
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
|
||
|
# Feel free to rename the models, but don't rename db_table values or field names.
|
||
|
from django.db import models
|
||
|
|
||
|
|
||
|
class Answer(models.Model):
|
||
|
a_id = models.AutoField(primary_key=True)
|
||
|
q_id = models.IntegerField()
|
||
|
answer = models.TextField()
|
||
|
correct = models.IntegerField()
|
||
|
ref_a_id = models.IntegerField(blank=True, null=True)
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'answers'
|
||
|
|
||
|
|
||
|
class IncorrectAnswer(models.Model):
|
||
|
lp_id = models.IntegerField(primary_key=True) # The composite primary key (lp_id, q_id) found, that is not supported. The first column is selected.
|
||
|
q_id = models.IntegerField()
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'answers_incorrect'
|
||
|
unique_together = (('lp_id', 'q_id'),)
|
||
|
|
||
|
|
||
|
class LearnProgress(models.Model):
|
||
|
lp_id = models.AutoField(primary_key=True, db_comment='Schlüssel')
|
||
|
user_id = models.CharField(max_length=15)
|
||
|
root = models.CharField(max_length=45)
|
||
|
date = models.DateTimeField(db_comment='Uhrzeit und Datum')
|
||
|
t_id = models.IntegerField(db_comment='Themen ID')
|
||
|
number = models.IntegerField(db_comment='Anzahl der Fragen')
|
||
|
correct = models.IntegerField(db_comment='Richtige Fragen')
|
||
|
wrong = models.IntegerField(db_comment='Anzahl der falschen Antworten')
|
||
|
percentage = models.DecimalField(max_digits=5, decimal_places=0, blank=True, null=True)
|
||
|
uploaded = models.IntegerField(blank=True, null=True)
|
||
|
passed = models.IntegerField()
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'learnprogress'
|
||
|
|
||
|
|
||
|
class QuestionDescription(models.Model):
|
||
|
q_id = models.IntegerField(primary_key=True)
|
||
|
description = models.TextField()
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'question_description'
|
||
|
|
||
|
|
||
|
class Question(models.Model):
|
||
|
q_id = models.AutoField(primary_key=True, db_comment='Primärschlüssel')
|
||
|
qt_id = models.IntegerField(db_comment='Fragetyp')
|
||
|
t_id = models.IntegerField(db_comment='Topic_id')
|
||
|
question = models.TextField(db_comment='Frage')
|
||
|
active = models.CharField(max_length=1)
|
||
|
description = models.CharField(max_length=1)
|
||
|
ref_q_id = models.IntegerField(blank=True, null=True)
|
||
|
translationstatus = models.IntegerField(blank=True, null=True)
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'questions'
|
||
|
db_table_comment = 'Fragen'
|
||
|
|
||
|
|
||
|
class QuestionType(models.Model):
|
||
|
qt_id = models.AutoField(primary_key=True, db_comment='Fragetypenschlüssel')
|
||
|
de = models.CharField(db_column='DE', max_length=25, db_comment='Fragetyp') # Field name made lowercase.
|
||
|
en = models.CharField(db_column='EN', max_length=25) # Field name made lowercase.
|
||
|
fr = models.CharField(db_column='FR', max_length=25, blank=True, null=True) # Field name made lowercase.
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'questiontype'
|
||
|
db_table_comment = 'Fragetypen'
|
||
|
|
||
|
|
||
|
class QuestionTypeV2(models.Model):
|
||
|
qt_id = models.AutoField(primary_key=True, db_comment='Fragetypenschlssel') # The composite primary key (qt_id, lang) found, that is not supported. The first column is selected.
|
||
|
lang = models.CharField(max_length=5, db_comment='Sprache')
|
||
|
qt_desc = models.CharField(max_length=25, db_comment='Fragetyp')
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'questiontype_v2'
|
||
|
unique_together = (('qt_id', 'lang'),)
|
||
|
db_table_comment = 'Fragetypen'
|
||
|
|
||
|
|
||
|
class SchemaVersion(models.Model):
|
||
|
version = models.IntegerField(unique=True)
|
||
|
when = models.DateTimeField()
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'schema_version'
|
||
|
|
||
|
|
||
|
class Statistics(models.Model):
|
||
|
stat_id = models.AutoField(primary_key=True, db_comment='Primärschlüssel')
|
||
|
q_id = models.IntegerField(db_comment='Frage Id')
|
||
|
count = models.IntegerField(db_comment='Zählen von Antworten')
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'statistics'
|
||
|
|
||
|
|
||
|
class Temp(models.Model):
|
||
|
uid = models.CharField(max_length=10, blank=True, null=True)
|
||
|
number = models.IntegerField(blank=True, null=True)
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'temp'
|
||
|
|
||
|
|
||
|
class TopicType(models.Model):
|
||
|
type_id = models.AutoField(primary_key=True)
|
||
|
text = models.CharField(max_length=255)
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'topic_type'
|
||
|
|
||
|
|
||
|
class Topic(models.Model):
|
||
|
t_id = models.AutoField(primary_key=True, db_comment='Primärschlüssel')
|
||
|
topic = models.CharField(unique=True, max_length=50, db_comment='Thema')
|
||
|
active = models.IntegerField()
|
||
|
numofqu = models.IntegerField(db_column='numOfQu') # Field name made lowercase.
|
||
|
percentage = models.IntegerField()
|
||
|
lang = models.CharField(max_length=42, blank=True, null=True)
|
||
|
type_id = models.IntegerField(blank=True, null=True)
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'topics'
|
||
|
db_table_comment = 'Themen'
|
||
|
|
||
|
|
||
|
class User(models.Model):
|
||
|
user_id = models.CharField(primary_key=True, max_length=10) # The composite primary key (user_id, root) found, that is not supported. The first column is selected.
|
||
|
cn_name = models.CharField(db_column='CN_name', max_length=100) # Field name made lowercase.
|
||
|
lang = models.CharField(max_length=2)
|
||
|
admin = models.CharField(max_length=1)
|
||
|
email = models.CharField(max_length=100)
|
||
|
sendcert = models.CharField(db_column='sendCert', max_length=13) # Field name made lowercase.
|
||
|
root = models.CharField(max_length=45)
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'user'
|
||
|
unique_together = (('user_id', 'root'),)
|
||
|
|
||
|
|
||
|
class UserAddress(models.Model):
|
||
|
user_id = models.CharField(primary_key=True, max_length=10) # The composite primary key (user_id, root) found, that is not supported. The first column is selected.
|
||
|
root = models.CharField(max_length=45)
|
||
|
firstname = models.CharField(max_length=25)
|
||
|
lastname = models.CharField(max_length=25)
|
||
|
street = models.CharField(max_length=50)
|
||
|
housenumber = models.CharField(max_length=5)
|
||
|
zipcode = models.CharField(max_length=10)
|
||
|
city = models.CharField(max_length=30)
|
||
|
state = models.CharField(max_length=50)
|
||
|
country = models.CharField(max_length=50)
|
||
|
|
||
|
class Meta:
|
||
|
db_table = 'user_address'
|
||
|
unique_together = (('user_id', 'root'),)
|