dingxin_toolbox
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.4 KiB

1 year ago
from rest_framework import serializers, fields
10 months ago
from update.models import *
1 year ago
class CinemaSerializer(serializers.ModelSerializer):
11 months ago
update_time = serializers.DateTimeField(format='%Y-%m-%d %H:%M:%S')
1 year ago
class Meta:
model = Cinema
10 months ago
fields = (
'id', 'name', 'ip', 'zz_num', 'inner_id', 'db_user', 'db_pwd', 'sys_ver', 'client_ver', 'user',
'update_time')
class CinemaUserSerializer(serializers.ModelSerializer):
class Meta:
model = CinemaUser
fields = ('id', 'username', 'is_delete', 'pinyin')
class ReleaseSerializer(serializers.ModelSerializer):
class Meta:
model = Release
10 months ago
fields = ('id', 'release', 'short_release', 'main_ver', 'ver_id', 'status')
10 months ago
class ClientReleaseSerializer(serializers.ModelSerializer):
update_time = serializers.DateTimeField(format='%Y-%m-%d %H:%M:%S')
class Meta:
model = ClientRelease
10 months ago
fields = (
'id', 'origin_name', 'client_ver', 'main_ver', 'sub_ver', 'ver_id', 'upload_name', 'client_type',
'is_delete', 'update_time')
10 months ago
class UpdateCommandSerializer(serializers.ModelSerializer):
update_time = serializers.DateTimeField(format='%Y-%m-%d %H:%M:%S')
class Meta:
model = UpdateCommand
10 months ago
fields = (
'id', 'desc', 'command', 'ver_id', 'process', 'run_num', 'is_sys', 'is_checked', 'is_force', 'is_delete',
'update_time')