2020-03-11 23:40:41 +00:00
|
|
|
from teal.resource import Converters, Resource
|
|
|
|
|
|
|
|
from ereuse_devicehub.resources.action import schemas
|
2020-03-12 14:11:38 +00:00
|
|
|
from ereuse_devicehub.resources.proof.views import ProofView
|
2020-03-11 23:40:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ProofDef(Resource):
|
|
|
|
SCHEMA = schemas.Proof
|
|
|
|
VIEW = ProofView
|
|
|
|
AUTH = True
|
|
|
|
ID_CONVERTER = Converters.uuid
|
|
|
|
|
|
|
|
|
2020-03-12 14:11:38 +00:00
|
|
|
class ProofTransferDef(ProofDef):
|
2020-03-11 23:40:41 +00:00
|
|
|
VIEW = None
|
2020-03-12 14:11:38 +00:00
|
|
|
SCHEMA = schemas.ProofTransfer
|
2020-03-11 23:40:41 +00:00
|
|
|
|
|
|
|
|
2020-03-12 14:11:38 +00:00
|
|
|
class ProofDataWipeDef(ProofDef):
|
2020-03-11 23:40:41 +00:00
|
|
|
VIEW = None
|
2020-03-12 14:11:38 +00:00
|
|
|
SCHEMA = schemas.ProofDataWipe
|
2020-03-11 23:40:41 +00:00
|
|
|
|
|
|
|
|
2020-03-12 14:11:38 +00:00
|
|
|
class ProofFunction(ProofDef):
|
2020-03-11 23:40:41 +00:00
|
|
|
VIEW = None
|
2020-03-12 14:11:38 +00:00
|
|
|
SCHEMA = schemas.ProofFunction
|
2020-03-11 23:40:41 +00:00
|
|
|
|
|
|
|
|
2020-03-12 14:11:38 +00:00
|
|
|
class ProofReuse(ProofDef):
|
2020-03-11 23:40:41 +00:00
|
|
|
VIEW = None
|
2020-03-12 14:11:38 +00:00
|
|
|
SCHEMA = schemas.ProofReuse
|
2020-03-11 23:40:41 +00:00
|
|
|
|
|
|
|
|
2020-03-12 14:11:38 +00:00
|
|
|
class ProofRecycling(ProofDef):
|
2020-03-11 23:40:41 +00:00
|
|
|
VIEW = None
|
2020-03-12 14:11:38 +00:00
|
|
|
SCHEMA = schemas.ProofRecycling
|