🐛 永久封存恢复前的旧取件码
This commit is contained in:
1 parent
56a86c59cf
commit
d75044e884
7 files changed
+92
-10
No files matched your search
@@ -46,6 +46,19 @@ class FileCodes(models.Model):
|
||||
return f"{self.file_path}/{self.uuid_file_name}"
|
||||
|
||||
|
||||
class ShareCodeReservations(models.Model):
|
||||
"""已退役取件码的永久封存登记,防止恢复文件后旧码被重新分配。"""
|
||||
|
||||
id = fields.IntField(pk=True)
|
||||
code = fields.CharField(max_length=255, unique=True, index=True)
|
||||
file_code_id = fields.IntField(null=True, index=True)
|
||||
reason = fields.CharField(max_length=32, default="retired")
|
||||
created_at = fields.DatetimeField(auto_now_add=True)
|
||||
|
||||
class Meta:
|
||||
table = "share_code_reservations"
|
||||
|
||||
|
||||
class UploadChunk(models.Model):
|
||||
id = fields.IntField(pk=True)
|
||||
upload_id = fields.CharField(max_length=36, index=True)
|
||||
|
||||
Reference in new issue
Block a user