<?xml version="1.0" encoding="utf-8"?>
<database
    name="swadroid_db_crypt"
    version="19" >

    <table
        name="courses"
        to-string="%name%" >
        <field
            name="id"
            obligatory="true"
            type="long" />
        <field
            name="userRole"
            new-in-version="9"
            obligatory="true"
            type="integer" />
        <field
            name="shortName"
            new-in-version="12"
            obligatory="true"
            type="text" />
        <field
            name="fullName"
            new-in-version="12"
            obligatory="true"
            type="text" />
    </table>
    <table
        name="notifications"
        new-in-version="3"
        to-string="%name%" >
        <field
            name="notifCode"
            new-in-version="16"
            obligatory="true"
            type="long" />
        <field
            name="eventCode"
            new-in-version="16"
            obligatory="true"
            type="long" />
        <field
            name="eventType"
            obligatory="true"
            type="text" />
        <field
            name="eventTime"
            obligatory="true"
            type="text" />
        <field
            name="userSurname1"
            obligatory="true"
            type="text" />
        <field
            name="userSurname2"
            obligatory="true"
            type="text" />
        <field
            name="userFirstname"
            obligatory="true"
            type="text" />
        <field
            name="userPhoto"
            new-in-version="13"
            obligatory="true"
            type="text" />
        <field
            name="location"
            obligatory="true"
            type="text" />
        <field
            name="summary"
            obligatory="true"
            type="text" />
        <field
            name="status"
            new-in-version="4"
            obligatory="true"
            type="text" />
        <field
            name="content"
            new-in-version="5"
            obligatory="true"
            type="text" />
        <field
            name="seenLocal"
            new-in-version="15"
            obligatory="true"
            type="text" />
        <field
            name="seenRemote"
            new-in-version="15"
            obligatory="true"
            type="text" />
    </table>
    <table
        name="tst_config"
        new-in-version="6"
        to-string="%name%" >
        <field
            name="id"
            obligatory="true"
            type="long" />
        <field
            name="min"
            obligatory="true"
            type="integer" />
        <field
            name="def"
            obligatory="true"
            type="integer" />
        <field
            name="max"
            obligatory="true"
            type="integer" />
        <field
            name="feedback"
            obligatory="true"
            type="text" />
        <field
            name="editTime"
            new-in-version="7"
            obligatory="true"
            type="text" />
    </table>
    <table
        name="tst_questions"
        new-in-version="6"
        to-string="%name%" >
        <field
            name="id"
            obligatory="true"
            type="long" />
        <field
            name="ansType"
            obligatory="true"
            type="text" />
        <field
            name="shuffle"
            obligatory="true"
            type="text" />
        <field
            name="stem"
            obligatory="true"
            type="text" />
        <field
            name="feedback"
            new-in-version="14"
            obligatory="false"
            type="text" />
    </table>
    <table
        name="tst_answers"
        new-in-version="6"
        to-string="%name%" >
        <field
            name="ansInd"
            new-in-version="8"
            obligatory="true"
            type="integer" />
        <field
            name="answer"
            obligatory="true"
            type="text" />
        <field
            name="correct"
            obligatory="true"
            type="text" />
        <field
            name="answerFeedback"
            new-in-version="14"
            obligatory="false"
            type="text" />
    </table>
    <table
        name="tst_tags"
        new-in-version="6"
        to-string="%name%" >
        <field
            name="id"
            obligatory="true"
            type="long" />
        <field
            name="tagTxt"
            obligatory="true"
            type="text" />
    </table>
    <table
        name="tst_question_tags"
        new-in-version="6"
        to-string="%name%" >
        <field
            name="qstCod"
            foreign-table="tst_questions"
            obligatory="true"
            type="foreign-key" />
        <field
            name="tagCod"
            foreign-table="tst_tags"
            obligatory="true"
            type="foreign-key" />
        <field
            name="tagInd"
            type="integer" />
    </table>
    <table
        name="tst_questions_course"
        new-in-version="6"
        to-string="%name%" >
        <field
            name="qstCod"
            foreign-table="tst_questions"
            obligatory="true"
            type="foreign-key" />
        <field
            name="crsCod"
            foreign-table="courses"
            obligatory="true"
            type="foreign-key" />
    </table>
    <table
        name="tst_question_answers"
        new-in-version="6"
        to-string="%name%" >
        <field
            name="qstCod"
            foreign-table="tst_questions"
            obligatory="true"
            type="foreign-key" />
        <field
            name="ansCod"
            foreign-table="tst_answers"
            obligatory="true"
            type="foreign-key" />
    </table>
    <table
        name="users"
        new-in-version="10"
        to-string="%name%" >
        <field
            name="userCode"
            obligatory="true"
            type="integer" />
        <field
            name="userID"
            obligatory="true"
            type="text" />
        <field
            name="userNickname"
            obligatory="true"
            type="text" />
        <field
            name="userSurname1"
            obligatory="true"
            type="text" />
        <field
            name="userSurname2"
            obligatory="true"
            type="text" />
        <field
            name="userFirstname"
            obligatory="true"
            type="text" />
        <field
            name="photoPath"
            obligatory="true"
            type="text" />
        <field
            name="userRole"
            obligatory="true"
            type="integer" />
    </table>
    <table
        name="users_courses"
        new-in-version="10"
        to-string="%name%" >
        <field
            name="userCode"
            foreign-table="users"
            obligatory="true"
            type="foreign-key" />
        <field
            name="crsCod"
            foreign-table="courses"
            obligatory="true"
            type="foreign-key" />
        <field
            name="grpCod"
            new-in-version="11"
            obligatory="true"
            type="foreign-key" />
    </table>
    <table
        name="users_attendances"
        new-in-version="17"
        to-string="%name%" >
        <field
            name="userCode"
            foreign-table="users"
            obligatory="true"
            type="foreign-key" />
        <field
            name="eventCode"
            obligatory="true"
            type="integer" />
        <field
            name="present"
            obligatory="true"
            type="integer" />
    </table>
    <table
        name="events_attendances"
        new-in-version="18"
        to-string="%name%" >
        <field
            name="id"
            obligatory="true"
            type="long" />
        <field
            name="hidden"
            obligatory="true"
            type="integer" />
        <field
            name="userSurname1"
            obligatory="true"
            type="text" />
        <field
            name="userSurname2"
            obligatory="true"
            type="text" />
        <field
            name="userFirstName"
            obligatory="true"
            type="text" />
        <field
            name="userPhoto"
            obligatory="true"
            type="text" />
        <field
            name="startTime"
            obligatory="true"
            type="integer" />
        <field
            name="endTime"
            obligatory="true"
            type="integer" />
        <field
            name="commentsTeachersVisible"
            obligatory="true"
            type="integer" />
        <field
            name="title"
            obligatory="true"
            type="string" />
        <field
            name="text"
            obligatory="true"
            type="string" />
        <field
            name="groups"
            obligatory="true"
            type="string" />
        <field
            name="status"
            obligatory="true"
            type="string" />
    </table>
    <table
        name="events_courses"
        new-in-version="19"
        to-string="%name%" >
    <field
        name="eventCode"
        foreign-table="events_attendances"
        obligatory="true"
        type="foreign-key" />
    <field
        name="crsCod"
        foreign-table="courses"
        obligatory="true"
        type="foreign-key" />
    </table>
    <table
        name="groups"
        new-in-version="11"
        to-string="%name%" >
        <field
            name="id"
            obligatory="true"
            type="integer" />
        <field
            name="groupName"
            obligatory="true"
            type="text" />
        <field
            name="maxStudents"
            new-in-version="13"
            obligatory="true"
            type="integer" />
        <field
            name="students"
            new-in-version="13"
            obligatory="true"
            type="integer" />
        <field
            name="open"
            new-in-version="13"
            obligatory="true"
            type="integer" />
        <field
            name="fileZones"
            new-in-version="13"
            obligatory="true"
            type="integer" />
        <field
            name="member"
            new-in-version="13"
            obligatory="true"
            type="integer" />
    </table>
    <table
        name="group_course"
        new-in-version="11"
        to-string="%name%" >
        <field
            name="grpCod"
            foreign-table="groups"
            obligatory="true"
            type="foreign-key" />
        <field
            name="crsCod"
            foreign-table="courses"
            obligatory="true"
            type="foreign-key" />
    </table>
    <table
        name="group_types"
        new-in-version="13"
        to-string="%name%" >
        <field
            name="id"
            obligatory="true"
            type="integer" />
        <field
            name="courseCode"
            obligatory="true"
            type="long" />
        <field
            name="groupTypeName"
            obligatory="true"
            type="text" />
        <field
            name="mandatory"
            obligatory="true"
            type="integer" />
        <field
            name="multiple"
            obligatory="true"
            type="integer" />
        <field
            name="openTime"
            obligatory="true"
            type="long" />
    </table>
    <table
        name="group_grouptypes"
        new-in-version="13"
        to-string="%name%" >
        <field
            name="grpTypCod"
            foreign-table="group_types"
            obligatory="true"
            type="foreign-key" />
        <field
            name="grpCod"
            foreign-table="groups"
            obligatory="true"
            type="foreign-key" />
    </table>

</database>