added migrations for objects
rebuild requirements.txt
This commit is contained in:
@@ -0,0 +1,182 @@
|
||||
# Generated by Django 5.2.3 on 2025-06-27 11:42
|
||||
|
||||
import django.contrib.auth.models
|
||||
import django.contrib.auth.validators
|
||||
import django.db.models.deletion
|
||||
import django.utils.timezone
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
("auth", "0012_alter_user_first_name_max_length"),
|
||||
("common", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="ClientPermission",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
],
|
||||
options={
|
||||
"permissions": (
|
||||
("can_book_container", "Can book container"),
|
||||
("can_view_bookings", "Can view bookings"),
|
||||
("can_manage_company_users", "Can manage company users"),
|
||||
),
|
||||
"managed": True,
|
||||
"default_permissions": (),
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name="DepotUser",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("password", models.CharField(max_length=128, verbose_name="password")),
|
||||
(
|
||||
"last_login",
|
||||
models.DateTimeField(
|
||||
blank=True, null=True, verbose_name="last login"
|
||||
),
|
||||
),
|
||||
(
|
||||
"is_superuser",
|
||||
models.BooleanField(
|
||||
default=False,
|
||||
help_text="Designates that this user has all permissions without explicitly assigning them.",
|
||||
verbose_name="superuser status",
|
||||
),
|
||||
),
|
||||
(
|
||||
"username",
|
||||
models.CharField(
|
||||
error_messages={
|
||||
"unique": "A user with that username already exists."
|
||||
},
|
||||
help_text="Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
|
||||
max_length=150,
|
||||
unique=True,
|
||||
validators=[
|
||||
django.contrib.auth.validators.UnicodeUsernameValidator()
|
||||
],
|
||||
verbose_name="username",
|
||||
),
|
||||
),
|
||||
(
|
||||
"first_name",
|
||||
models.CharField(
|
||||
blank=True, max_length=150, verbose_name="first name"
|
||||
),
|
||||
),
|
||||
(
|
||||
"last_name",
|
||||
models.CharField(
|
||||
blank=True, max_length=150, verbose_name="last name"
|
||||
),
|
||||
),
|
||||
(
|
||||
"is_staff",
|
||||
models.BooleanField(
|
||||
default=False,
|
||||
help_text="Designates whether the user can log into this admin site.",
|
||||
verbose_name="staff status",
|
||||
),
|
||||
),
|
||||
(
|
||||
"is_active",
|
||||
models.BooleanField(
|
||||
default=True,
|
||||
help_text="Designates whether this user should be treated as active. Unselect this instead of deleting accounts.",
|
||||
verbose_name="active",
|
||||
),
|
||||
),
|
||||
(
|
||||
"date_joined",
|
||||
models.DateTimeField(
|
||||
default=django.utils.timezone.now, verbose_name="date joined"
|
||||
),
|
||||
),
|
||||
(
|
||||
"phone_number",
|
||||
models.CharField(blank=True, max_length=15, null=True),
|
||||
),
|
||||
("email", models.EmailField(max_length=254, unique=True)),
|
||||
("new_field1", models.BooleanField(default=False)),
|
||||
("is_company_admin", models.BooleanField(default=False)),
|
||||
(
|
||||
"company",
|
||||
models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="user_lines",
|
||||
to="common.companymodel",
|
||||
),
|
||||
),
|
||||
(
|
||||
"groups",
|
||||
models.ManyToManyField(
|
||||
blank=True,
|
||||
help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.",
|
||||
related_name="user_set",
|
||||
related_query_name="user",
|
||||
to="auth.group",
|
||||
verbose_name="groups",
|
||||
),
|
||||
),
|
||||
(
|
||||
"line",
|
||||
models.ForeignKey(
|
||||
blank=True,
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="user_lines",
|
||||
to="common.linesmodel",
|
||||
),
|
||||
),
|
||||
(
|
||||
"user_permissions",
|
||||
models.ManyToManyField(
|
||||
blank=True,
|
||||
help_text="Specific permissions for this user.",
|
||||
related_name="user_set",
|
||||
related_query_name="user",
|
||||
to="auth.permission",
|
||||
verbose_name="user permissions",
|
||||
),
|
||||
),
|
||||
(
|
||||
"company_permissions",
|
||||
models.ManyToManyField(to="accounts.clientpermission"),
|
||||
),
|
||||
],
|
||||
options={
|
||||
"verbose_name": "user",
|
||||
"verbose_name_plural": "users",
|
||||
"abstract": False,
|
||||
},
|
||||
managers=[
|
||||
("objects", django.contrib.auth.models.UserManager()),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 5.2.3 on 2025-07-02 08:02
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("accounts", "0001_initial"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="clientpermission",
|
||||
name="codename",
|
||||
field=models.CharField(default="", max_length=100),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="clientpermission",
|
||||
name="name",
|
||||
field=models.CharField(default="", max_length=255),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,35 @@
|
||||
# Generated by Django 5.2.3 on 2025-07-02 12:04
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("accounts", "0002_clientpermission_codename_clientpermission_name"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name="depotuser",
|
||||
name="is_company_admin",
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name="depotuser",
|
||||
name="new_field1",
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="depotuser",
|
||||
name="user_type",
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
("BS", "Barrier Staff"),
|
||||
("CA", "Company Admin"),
|
||||
("EM", "Employee"),
|
||||
("CL", "Client"),
|
||||
],
|
||||
default="CL",
|
||||
max_length=2,
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,43 @@
|
||||
# Generated by Django 5.2.3 on 2025-07-03 08:11
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("accounts", "0003_remove_depotuser_is_company_admin_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="EmployeePermission",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("codename", models.CharField(default="", max_length=100)),
|
||||
("name", models.CharField(default="", max_length=255)),
|
||||
],
|
||||
options={
|
||||
"permissions": (
|
||||
("can_manage_containers", "Can manage containers"),
|
||||
("can_view_reports", "Can view reports"),
|
||||
("can_handle_operations", "Can handle operations"),
|
||||
),
|
||||
"managed": True,
|
||||
"default_permissions": (),
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name="depotuser",
|
||||
name="employee_permissions",
|
||||
field=models.ManyToManyField(blank=True, to="accounts.employeepermission"),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,32 @@
|
||||
# Generated by Django 5.2.3 on 2025-07-03 14:17
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("accounts", "0004_employeepermission_depotuser_employee_permissions"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelManagers(
|
||||
name="depotuser",
|
||||
managers=[],
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name="depotuser",
|
||||
name="user_type",
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
("BS", "Barrier Staff"),
|
||||
("CA", "Company Admin"),
|
||||
("EM", "Employee"),
|
||||
("CL", "Client"),
|
||||
("AD", "Admin"),
|
||||
],
|
||||
default="CL",
|
||||
max_length=2,
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,29 @@
|
||||
# Generated by Django 5.2.3 on 2025-07-09 12:51
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("accounts", "0005_alter_depotuser_managers_alter_depotuser_user_type"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name="clientpermission",
|
||||
options={
|
||||
"default_permissions": (),
|
||||
"managed": True,
|
||||
"permissions": (
|
||||
("can_view_booking", "Can view booking"),
|
||||
("can_manage_booking", "Can book container"),
|
||||
("can_view_preinfo", "Can view preinfo"),
|
||||
("can_manage_preinfo", "Can manage preinfo"),
|
||||
("can_view_payment", "Can view payment"),
|
||||
("can_manage_payment", "Can manage payment"),
|
||||
("can_manage_company_users", "Can manage company users"),
|
||||
),
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,12 @@
|
||||
# Generated by Django 5.2.3 on 2025-07-25 16:20
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("accounts", "0006_alter_clientpermission_options"),
|
||||
]
|
||||
|
||||
operations = []
|
||||
Reference in New Issue
Block a user