From 13f3739e17c37f58b8197db8acf0659d08b25fcb Mon Sep 17 00:00:00 2001 From: nero Date: Fri, 10 Nov 2023 15:03:22 +0800 Subject: [PATCH] refactor: add migrations file --- .../migrations/0006_auto_20231108_1207.py | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/bk-user/bkuser/apps/tenant/migrations/0006_auto_20231108_1207.py diff --git a/src/bk-user/bkuser/apps/tenant/migrations/0006_auto_20231108_1207.py b/src/bk-user/bkuser/apps/tenant/migrations/0006_auto_20231108_1207.py new file mode 100644 index 000000000..73d7ac5e7 --- /dev/null +++ b/src/bk-user/bkuser/apps/tenant/migrations/0006_auto_20231108_1207.py @@ -0,0 +1,38 @@ +# Generated by Django 3.2.20 on 2023-11-08 04:07 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('tenant', '0005_builtin_user_fields'), + ] + + operations = [ + migrations.AlterField( + model_name='tenantuser', + name='wx_openid', + field=models.CharField(blank=True, default='', max_length=64, null=True, verbose_name='微信公众号 用户OpenID'), + ), + migrations.CreateModel( + name='TenantUserValidityPeriodConfig', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('creator', models.CharField(blank=True, max_length=128, null=True)), + ('updater', models.CharField(blank=True, max_length=128, null=True)), + ('enabled', models.BooleanField(default=True, verbose_name='是否启用账户有效期')), + ('validity_period', models.IntegerField(default=-1, verbose_name='有效期(单位:天)')), + ('remind_before_expire', models.JSONField(default=list, verbose_name='临X天过期发送提醒(单位:天)')), + ('enabled_notification_methods', models.JSONField(default=list, verbose_name='通知方式')), + ('notification_templates', models.JSONField(default=list, verbose_name='通知模板')), + ('tenant', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='tenant.tenant')), + ], + options={ + 'abstract': False, + }, + ), + ]