initial commit
This commit is contained in:
65
core/apps/banks/migrations/0001_initial.py
Normal file
65
core/apps/banks/migrations/0001_initial.py
Normal file
@@ -0,0 +1,65 @@
|
||||
# Generated by Django 5.2.4 on 2025-08-01 09:53
|
||||
|
||||
import django.core.validators
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = []
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="BankModel",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.UUIDField(
|
||||
default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name="ID"
|
||||
),
|
||||
),
|
||||
("created_at", models.DateTimeField(auto_now_add=True, verbose_name="Created At")),
|
||||
("updated_at", models.DateTimeField(auto_now=True, verbose_name="Updated At")),
|
||||
(
|
||||
"name",
|
||||
models.CharField(
|
||||
max_length=255,
|
||||
unique=True,
|
||||
validators=[
|
||||
django.core.validators.RegexValidator(
|
||||
message="Enter a valid bank name. Only letters, numbers, spaces, hyphens, ampersands, commas, periods, apostrophes, and parentheses are allowed. Length must be 2–100 characters.",
|
||||
regex="^[A-Za-z0-9À-ÿ&'\\-.,() ]{2,100}$",
|
||||
)
|
||||
],
|
||||
verbose_name="Name",
|
||||
),
|
||||
),
|
||||
(
|
||||
"bic_code",
|
||||
models.CharField(
|
||||
unique=True,
|
||||
validators=[
|
||||
django.core.validators.RegexValidator(
|
||||
code="Invalid BIC/SWIFT code",
|
||||
message="Enter a valid BIC/SWIFT code (8 or 11 uppercase letters/numbers).",
|
||||
regex="^[A-Z]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$",
|
||||
)
|
||||
],
|
||||
verbose_name="BIC code",
|
||||
),
|
||||
),
|
||||
],
|
||||
options={
|
||||
"verbose_name": "Bank",
|
||||
"verbose_name_plural": "Banks",
|
||||
"db_table": "banks",
|
||||
"indexes": [
|
||||
models.Index(fields=["bic_code"], name="banks_bic_code_inx"),
|
||||
models.Index(fields=["name"], name="banks_name_inx"),
|
||||
],
|
||||
},
|
||||
),
|
||||
]
|
||||
0
core/apps/banks/migrations/__init__.py
Normal file
0
core/apps/banks/migrations/__init__.py
Normal file
Reference in New Issue
Block a user