28 lines
932 B
Python
28 lines
932 B
Python
from django.db import migrations, models
|
|
|
|
|
|
def seed_policy(apps, schema_editor):
|
|
apps.get_model("notifications", "NotificationPolicy").objects.get_or_create(
|
|
key="CUSTOMER_REPLY_BALE",
|
|
defaults={"quiet_period_seconds": 600, "is_active": True},
|
|
)
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [("notifications", "0003_notificationpolicy_notificationjob_status")]
|
|
operations = [
|
|
migrations.AlterField(
|
|
model_name="notificationpolicy",
|
|
name="key",
|
|
field=models.CharField(
|
|
choices=[
|
|
("STAFF_REPLY_SMS", "پیامک پاسخ کارشناس"),
|
|
("CUSTOMER_REPLY_BALE", "اعلان پاسخ مشتری در بله"),
|
|
],
|
|
max_length=50,
|
|
unique=True,
|
|
),
|
|
),
|
|
migrations.RunPython(seed_policy, migrations.RunPython.noop),
|
|
]
|