This commit is contained in:
anhduy-tech
2026-01-26 08:15:42 +07:00
parent 2ac88177d8
commit 559f8169c9
15 changed files with 791 additions and 229 deletions

View File

@@ -0,0 +1,36 @@
# Generated by Django 5.1.7 on 2026-01-23 16:51
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0362_gift'),
]
operations = [
migrations.AlterUniqueTogether(
name='transaction_discount',
unique_together=set(),
),
migrations.CreateModel(
name='Batch_Job',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('cron_schedule', models.CharField(help_text="Cron-like schedule (e.g., '0 0 * * *' for daily at midnight)", max_length=100)),
('parameters', models.JSONField(blank=True, default=dict, help_text='Parameters to find data for the workflow context')),
('is_active', models.BooleanField(db_index=True, default=True)),
('last_run_at', models.DateTimeField(blank=True, null=True)),
('next_run_at', models.DateTimeField(blank=True, db_index=True, null=True)),
('create_time', models.DateTimeField(auto_now_add=True)),
('update_time', models.DateTimeField(auto_now=True)),
('workflow', models.ForeignKey(help_text='Workflow to execute', on_delete=django.db.models.deletion.PROTECT, to='app.workflow')),
],
options={
'db_table': 'batch_job',
},
),
]

View File

@@ -0,0 +1,18 @@
# Generated by Django 5.1.7 on 2026-01-24 04:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0363_alter_transaction_discount_unique_together_batch_job'),
]
operations = [
migrations.AlterField(
model_name='user',
name='email',
field=models.CharField(max_length=100, null=True, unique=True),
),
]

View File

@@ -0,0 +1,23 @@
# Generated by Django 5.1.7 on 2026-01-25 11:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0364_alter_user_email'),
]
operations = [
migrations.AddField(
model_name='payment_schedule',
name='penalty_paid',
field=models.DecimalField(decimal_places=2, max_digits=15, null=True),
),
migrations.AddField(
model_name='payment_schedule',
name='penalty_reduce',
field=models.DecimalField(decimal_places=2, max_digits=15, null=True),
),
]