|
|
|
@ -139,3 +139,25 @@ class UpdateAlter(BaseModels): |
|
|
|
|
verbose_name = 'alter' |
|
|
|
|
verbose_name_plural = 'alter' |
|
|
|
|
db_table = 'update_alter' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class UpdateLog(BaseModels): |
|
|
|
|
""" |
|
|
|
|
记录升级日志 |
|
|
|
|
""" |
|
|
|
|
id = models.AutoField(primary_key=True) |
|
|
|
|
ip = models.CharField(verbose_name='ip地址', max_length=20, null=False, help_text='ip地址') |
|
|
|
|
type = models.CharField(verbose_name='触发类型', max_length=20, null=False, help_text='触发类型') |
|
|
|
|
origin_ver = models.CharField(verbose_name='升级前版本', max_length=200, null=False, help_text='升级前版本') |
|
|
|
|
target_ver = models.CharField(verbose_name='升级后版本', max_length=200, null=False, help_text='升级后版本') |
|
|
|
|
time = models.DateTimeField(verbose_name='操作时间', help_text='操作时间') |
|
|
|
|
result = models.CharField(verbose_name='升级结果', max_length=20, null=False, help_text='升级结果') |
|
|
|
|
result_detail = models.TextField(verbose_name='升级结果详情', null=False, help_text='升级结果详情') |
|
|
|
|
|
|
|
|
|
def __str__(self): |
|
|
|
|
return self.ip |
|
|
|
|
|
|
|
|
|
class Meta: |
|
|
|
|
verbose_name = '升级日志' |
|
|
|
|
verbose_name_plural = '升级日志' |
|
|
|
|
db_table = 'update_log' |
|
|
|
|