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.

102 lines
4.5 KiB

from django.db import models
1 year ago
from common.base_model import BaseModels
1 year ago
class Cinema(BaseModels):
"""
影院信息表
"""
id = models.AutoField(primary_key=True)
1 year ago
name = models.CharField(verbose_name='影院名称', max_length=100, null=False, help_text='影院名称')
ip = models.CharField(verbose_name='影院ip', max_length=20, null=False, help_text='影院ip')
zz_num = models.CharField(verbose_name='影院转账8位编码', max_length=8, null=False, help_text='影院转账8位编码')
inner_id = models.CharField(verbose_name="影院4位编码", max_length=4, null=False, help_text='影院4位编码')
db_user = models.CharField(verbose_name='影院数据库账号', max_length=20, null=False, help_text='影院数据库账号')
db_pwd = models.CharField(verbose_name='影院数据库密码', max_length=50, null=False, help_text='影院数据库密码')
sys_ver = models.CharField(verbose_name='鼎新系统版本', max_length=50, null=False, help_text='鼎新系统版本')
client_ver = models.CharField(verbose_name='鼎新客户端版本', max_length=50, null=False, help_text='鼎新客户端版本')
10 months ago
user = models.CharField(verbose_name='使用人', max_length=10, null=True, help_text='当前使用人')
1 year ago
def __str__(self):
return self.ip
class Meta:
verbose_name = '影院信息'
1 year ago
verbose_name_plural = '影院信息'
1 year ago
db_table = 'update_cinema'
10 months ago
class CinemaUser(models.Model):
"""
鼎新使用人表
"""
id = models.AutoField(primary_key=True)
username = models.CharField(verbose_name='用户名', max_length=30, null=False, help_text='用户名')
is_delete = models.BooleanField(verbose_name='是否删除', default=False, help_text='是否删除')
def __str__(self):
return self.username
class Meta:
verbose_name = '影院使用人'
verbose_name_plural = '影院使用人'
db_table = 'update_cinema_user'
class Release(BaseModels):
"""
鼎新版本表
"""
id = models.AutoField(primary_key=True)
version = models.CharField(verbose_name='鼎新版本', max_length=100, null=False, help_text='鼎新版本')
short_ver = models.CharField(verbose_name='短版本号', max_length=100, null=False, help_text='短版本号')
status = models.CharField(verbose_name='版本状态', max_length=10, null=False,
help_text='版本状态, 0-开发, 1-测试, 2上线', default='0')
def __str__(self):
return self.version
class Meta:
verbose_name = '鼎新版本'
verbose_name_plural = '鼎新版本'
db_table = 'update_dingxin_release'
class ClientRelease(BaseModels):
"""
鼎新客户端版本
"""
id = models.AutoField(primary_key=True)
origin_name = models.CharField(verbose_name='原始名称', max_length=500, null=False, help_text='smb上的名称')
ver_time = models.CharField(verbose_name='版本发布时间', max_length=100, null=False, help_text='版本发布时间')
upload_name = models.CharField(verbose_name='上传名称', max_length=200, null=False, help_text='上传名称')
is_delete = models.BooleanField(verbose_name='是否有效', default=True, help_text='是否有效')
def __str__(self):
return self.upload_name
class Meta:
verbose_name = '鼎新客户端版本'
verbose_name_plural = '鼎新客户端版本'
db_table = 'update_client_release'
class UpdateCommand(BaseModels):
"""
执行更新时的命令
"""
id = models.AutoField(primary_key=True)
desc = models.CharField(verbose_name='命令作用描述', max_length=200, null=False, help_text='命令作用描述')
command = models.CharField(verbose_name='需执行的命令', max_length=2000, null=False, help_text='需执行的命令')
10 months ago
process = models.CharField(verbose_name='执行顺序', max_length=20, default='setup', help_text='执行顺序 setup 对比数据库前执行 teardown 对比数据库后执行')
10 months ago
is_sys = models.BooleanField(verbose_name='系统命令', default=False, help_text='系统命令,默认执行前台不展示')
is_checked = models.BooleanField(verbose_name='默认勾选', default=False, help_text='前台页面默认是否勾选')
is_delete = models.BooleanField(verbose_name='是否有效', default=True, help_text='是否有效')
def __str__(self):
return self.desc
class Meta:
verbose_name = '升级脚本'
verbose_name_plural = '升级脚本'
db_table = 'update_command'