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.
61 lines
3.0 KiB
61 lines
3.0 KiB
3 years ago
|
# Generated by Django 3.2.3 on 2022-05-13 08:43
|
||
|
|
||
|
import django.db.models.fields
|
||
|
from django.conf import settings
|
||
|
from django.db import migrations, models
|
||
|
|
||
|
|
||
|
class Migration(migrations.Migration):
|
||
|
dependencies = [
|
||
|
('api', '0005_auto_20220412_1744'),
|
||
|
]
|
||
|
|
||
|
operations = [
|
||
|
migrations.AddField(
|
||
|
model_name='appstorage',
|
||
|
name='max_storage_capacity',
|
||
|
field=models.BigIntegerField(default=0, verbose_name='存储最大使用容量,单位btype'),
|
||
|
),
|
||
|
migrations.AddField(
|
||
|
model_name='userinfo',
|
||
|
name='storage_capacity',
|
||
|
field=models.BigIntegerField(default=0, verbose_name='存储容量,单位byte'),
|
||
|
),
|
||
|
migrations.AlterField(
|
||
|
model_name='userinfo',
|
||
|
name='storage',
|
||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL,
|
||
|
related_name='app_storage', to='api.appstorage', verbose_name='存储'),
|
||
|
),
|
||
|
migrations.AlterUniqueTogether(
|
||
|
name='appstorage',
|
||
|
unique_together={('user_id', 'bucket_name', 'endpoint'), ('user_id', 'name')},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='StorageShareInfo',
|
||
|
fields=[
|
||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||
|
('status',
|
||
|
models.SmallIntegerField(choices=[(1, '共享成功'), (2, '取消共享')], default=0, help_text='1 共享成功 2 取消共享',
|
||
|
verbose_name='状态')),
|
||
|
('number', models.BigIntegerField(default=0, verbose_name='容量大小,单位byte')),
|
||
|
('description', models.CharField(blank=True, default='', max_length=128, verbose_name='操作描述')),
|
||
|
('remote_addr', models.GenericIPAddressField(verbose_name='远程IP地址')),
|
||
|
('created_time', models.DateTimeField(auto_now_add=True, verbose_name='添加时间')),
|
||
|
('updated_time', models.DateTimeField(auto_now=True, verbose_name='更新时间')),
|
||
|
('storage_id', models.ForeignKey(on_delete=django.db.models.fields.CharField, to='api.appstorage',
|
||
|
verbose_name='存储ID')),
|
||
|
('to_user_id', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
|
||
|
related_name='storage_to_user_id', to=settings.AUTH_USER_MODEL,
|
||
|
verbose_name='用户ID')),
|
||
|
('user_id',
|
||
|
models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='storage_org_user_id',
|
||
|
to=settings.AUTH_USER_MODEL, verbose_name='用户ID')),
|
||
|
],
|
||
|
options={
|
||
|
'verbose_name': '私有存储共享',
|
||
|
'verbose_name_plural': '私有存储共享',
|
||
|
},
|
||
|
),
|
||
|
]
|