PUT /lms.user
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"user": {
"properties": {
"id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"username": {
"type": "keyword",
"cql_collection": "singleton"
},
"email": {
"type": "keyword",
"cql_collection": "singleton"
},
"hash_password": {
"type": "keyword",
"cql_collection": "singleton"
},
"type": {
"type": "keyword",
"cql_collection": "singleton"
},
"info": {
"type": "nested",
"cql_collection": "singleton",
"cql_struct" : "opaque_map",
"properties": {
"_key": {
"type": "text",
"cql_collection": "singleton"
}
}
}
}
}
}
}
PUT /lms.topic
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"topic": {
"properties": {
"name": {
"type": "text",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0,
"analyzer": "standard"
}
}
}
}
}
PUT /lms.course
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"course": {
"date_detection": true,
"properties": {
"teacher_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": false,
"cql_primary_key_order": 1
},
"course_name": {
"type": "text",
"cql_collection": "singleton"
},
"created_at": {
"type": "date",
"cql_collection": "singleton"
},
"description": {
"type": "text",
"cql_collection": "singleton"
},
"archive": {
"type": "boolean",
"cql_collection": "singleton"
},
"topics": {
"type": "text",
"cql_collection": "set"
},
"members": {
"type": "keyword",
"cql_collection": "set"
}
}
}
}
}
PUT /lms.review
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"review": {
"date_detection": true,
"properties": {
"teacher_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"course_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 1
},
"student_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": false,
"cql_primary_key_order": 2
},
"star": {
"type": "byte",
"cql_collection": "singleton"
},
"content": {
"type": "text",
"cql_collection": "singleton"
},
"created_at": {
"type": "date",
"cql_collection": "singleton"
}
}
}
}
}
PUT /lms.join_request
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"join_request": {
"date_detection": true,
"properties": {
"teacher_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"course_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 1
},
"student_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": false,
"cql_primary_key_order": 2
},
"request_at": {
"type": "date",
"cql_collection": "singleton"
}
}
}
}
}
PUT /lms.member
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"member": {
"date_detection": true,
"properties": {
"teacher_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"course_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 1
},
"student_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": false,
"cql_primary_key_order": 2
},
"joined_at": {
"type": "date",
"cql_collection": "singleton"
}
}
}
}
}
PUT /lms.lesson
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"lesson": {
"date_detection": true,
"properties": {
"teacher_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"course_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 1
},
"id": {
"type": "date",
"cql_collection": "singleton",
"cql_partition_key": false,
"cql_primary_key_order": 2
},
"title": {
"type": "text",
"cql_collection": "singleton"
},
"content": {
"type": "text",
"cql_collection": "singleton"
}
}
}
}
}
PUT /lms.comment
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"comment": {
"date_detection": true,
"properties": {
"teacher_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"course_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 1
},
"lesson_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 2
},
"id": {
"type": "date",
"cql_collection": "singleton",
"cql_partition_key": false,
"cql_primary_key_order": 3
},
"user_id": {
"type": "keyword",
"cql_collection": "singleton"
},
"content": {
"type": "text",
"cql_collection": "singleton"
}
}
}
}
}
PUT /lms.exercise
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"exercise": {
"date_detection": true,
"properties": {
"teacher_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"course_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 1
},
"id": {
"type": "date",
"cql_collection": "singleton",
"cql_partition_key": false,
"cql_primary_key_order": 2
},
"title": {
"type": "text",
"cql_collection": "singleton"
},
"deadline": {
"type": "date",
"cql_collection": "singleton"
},
"content": {
"type": "text",
"cql_collection": "singleton"
}
}
}
}
}
PUT /lms.exercise_work
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"exercise_work": {
"date_detection": true,
"properties": {
"teacher_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"course_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 1
},
"exercise_id": {
"type": "date",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 2
},
"student_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": false,
"cql_primary_key_order": 3
},
"submit_at": {
"type": "date",
"cql_collection": "singleton"
},
"content": {
"type": "text",
"cql_collection": "singleton"
},
"point": {
"type": "float",
"cql_collection": "singleton"
}
}
}
}
}
PUT /lms.exam
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"exam": {
"date_detection": true,
"properties": {
"teacher_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"course_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 1
},
"id": {
"type": "date",
"cql_collection": "singleton",
"cql_partition_key": false,
"cql_primary_key_order": 2
},
"title": {
"type": "text",
"cql_collection": "singleton"
},
"start_at": {
"type": "date",
"cql_collection": "singleton"
},
"duration": {
"type": "keyword",
"cql_collection": "singleton"
},
"content": {
"type": "object",
"cql_udt_name": "quiz",
"cql_collection": "set",
"cql_struct" : "map",
"properties": {
"question": {
"type": "text",
"cql_collection": "singleton"
},
"choices": {
"type": "text",
"cql_collection": "set"
},
"answer": {
"type": "byte",
"cql_collection": "singleton"
},
"point": {
"type": "byte",
"cql_collection": "singleton"
}
}
}
}
}
}
}
PUT /lms.exam_work
{
"settings": {
"keyspace": "lms"
},
"mappings": {
"exam_work": {
"date_detection": true,
"properties": {
"teacher_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"course_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 1
},
"exam_id": {
"type": "date",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 2
},
"student_id": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": false,
"cql_primary_key_order": 3
},
"submit_at": {
"type": "date",
"cql_collection": "singleton"
},
"point": {
"type": "float",
"cql_collection": "singleton"
},
"content": {
"type": "object",
"cql_udt_name": "quiz",
"cql_collection": "set",
"cql_struct" : "map",
"properties": {
"question": {
"type": "text",
"cql_collection": "singleton"
},
"choices": {
"type": "text",
"cql_collection": "set"
},
"answer": {
"type": "byte",
"cql_collection": "singleton"
},
"point": {
"type": "byte",
"cql_collection": "singleton"
}
}
}
}
}
}
}