2017-11-29 11:27:04 +00:00
|
|
|
# ~*~ coding: utf-8 ~*~
|
|
|
|
from rest_framework import serializers
|
|
|
|
|
|
|
|
|
|
|
|
class SessionCommandSerializer(serializers.Serializer):
|
|
|
|
"""使用这个类作为基础Command Log Serializer类, 用来序列化"""
|
|
|
|
|
|
|
|
id = serializers.UUIDField(read_only=True)
|
|
|
|
user = serializers.CharField(max_length=64)
|
|
|
|
asset = serializers.CharField(max_length=128)
|
|
|
|
system_user = serializers.CharField(max_length=64)
|
|
|
|
input = serializers.CharField(max_length=128)
|
2017-12-03 16:21:26 +00:00
|
|
|
output = serializers.CharField(max_length=1024, allow_blank=True)
|
2017-11-29 11:27:04 +00:00
|
|
|
session = serializers.CharField(max_length=36)
|
|
|
|
timestamp = serializers.IntegerField()
|
|
|
|
|