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.
42 lines
1.8 KiB
42 lines
1.8 KiB
3 years ago
|
# Generated by Django 3.2.3 on 2022-04-12 17:44
|
||
|
|
||
|
import django.db.models.deletion
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
dependencies = [
|
||
|
('api', '0004_auto_20220330_0009'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.RemoveField(
|
||
|
model_name='apps',
|
||
|
name='password',
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='apps',
|
||
|
name='need_password',
|
||
|
field=models.BooleanField(default=False, help_text='默认 没有密码', verbose_name='访问密码'),
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='AppDownloadToken',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('token', models.CharField(max_length=64, verbose_name='授权码')),
|
||
|
('create_time', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
|
||
|
('update_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
|
||
|
('used_count', models.BigIntegerField(default=0, verbose_name='已经使用次数')),
|
||
|
('max_limit_count', models.BigIntegerField(default=0, verbose_name='最大可使用次数,0表示不限制')),
|
||
|
('description', models.CharField(blank=True, default='', max_length=256, verbose_name='备注')),
|
||
|
('app_id',
|
||
|
models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.apps', verbose_name='应用信息')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': '应用下载授权token',
|
||
|
'verbose_name_plural': '应用下载授权token',
|
||
|
'unique_together': {('app_id', 'token')},
|
||
|
},
|
||
|
),
|
||
|
]
|