forked from olga-f/JSPrep
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.py
More file actions
32 lines (26 loc) · 815 Bytes
/
types.py
File metadata and controls
32 lines (26 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import graphene
from graphene_mongo import MongoengineObjectType
from .models import Exercise, Unit
class UnitType(MongoengineObjectType):
class Meta:
model = Unit
class ExerciseType(MongoengineObjectType):
class Meta:
model = Exercise
class UnitInput(graphene.InputObjectType):
id = graphene.ID()
title = graphene.String()
about = graphene.List(graphene.String)
description = graphene.String()
image_url = graphene.String()
position = graphene.Int()
class ExerciseInput(graphene.InputObjectType):
id = graphene.ID()
unit = graphene.ID()
name = graphene.String()
description = graphene.String()
content=graphene.String()
category = graphene.String()
code = graphene.String()
test = graphene.String()
position = graphene.Int()