feat: add client release size bytes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.core.validators import RegexValidator
|
||||
from django.core.validators import MinValueValidator, RegexValidator
|
||||
from django.db import models, transaction
|
||||
|
||||
|
||||
@@ -13,6 +13,13 @@ class DownloadRelease(models.Model):
|
||||
version = models.CharField("版本", max_length=64)
|
||||
file = models.FileField("安装包文件", upload_to="downloads/", blank=True)
|
||||
external_url = models.URLField("外部下载地址", blank=True)
|
||||
size_bytes = models.PositiveBigIntegerField(
|
||||
"文件大小字节数",
|
||||
null=True,
|
||||
blank=True,
|
||||
validators=[MinValueValidator(1)],
|
||||
help_text="客户端下载文件大小,单位字节;桌面端用于下载后校验。",
|
||||
)
|
||||
sha256 = models.CharField(
|
||||
"SHA256",
|
||||
max_length=64,
|
||||
|
||||
Reference in New Issue
Block a user