first push

This commit is contained in:
2025-05-23 14:44:12 +08:00
commit abefd1b19b
817 changed files with 580289 additions and 0 deletions
+139
View File
@@ -0,0 +1,139 @@
# Generated by Django 3.2 on 2022-05-27 06:01
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Department',
fields=[
('status', models.IntegerField(default=1)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('created_by', models.IntegerField()),
('updated_by', models.IntegerField()),
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('name', models.CharField(blank=True, max_length=255, null=True)),
('contact_person_name', models.CharField(blank=True, max_length=255, null=True)),
('contact_person_email', models.CharField(blank=True, max_length=255, null=True)),
('contact_person_phone', models.CharField(blank=True, max_length=255, null=True)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Organization',
fields=[
('status', models.IntegerField(default=1)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('created_by', models.IntegerField()),
('updated_by', models.IntegerField()),
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('name', models.CharField(blank=True, max_length=255, null=True)),
('website', models.CharField(blank=True, max_length=255, null=True)),
('email', models.CharField(blank=True, max_length=255, null=True)),
('phone', models.CharField(blank=True, max_length=255, null=True)),
('currency', models.CharField(blank=True, max_length=255, null=True)),
('date_format', models.CharField(blank=True, max_length=255, null=True)),
('logo', models.ImageField(blank=True, max_length=255, null=True, upload_to='')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='ProductType',
fields=[
('status', models.IntegerField(default=1)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('created_by', models.IntegerField()),
('updated_by', models.IntegerField()),
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('name', models.CharField(blank=True, max_length=255, null=True)),
('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.organization')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='ProductCategory',
fields=[
('status', models.IntegerField(default=1)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('created_by', models.IntegerField()),
('updated_by', models.IntegerField()),
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('name', models.CharField(blank=True, max_length=255, null=True)),
('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.organization')),
('product_category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.producttype')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Location',
fields=[
('status', models.IntegerField(default=1)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('created_by', models.IntegerField()),
('updated_by', models.IntegerField()),
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('office_name', models.CharField(blank=True, max_length=255, null=True)),
('address_line_one', models.CharField(blank=True, max_length=255, null=True)),
('address_line_two', models.CharField(blank=True, max_length=255, null=True)),
('country', models.IntegerField()),
('state', models.IntegerField()),
('city', models.CharField(blank=True, max_length=255, null=True)),
('pin_code', models.CharField(blank=True, max_length=255, null=True)),
('contact_person_name', models.CharField(blank=True, max_length=255, null=True)),
('contact_person_phone', models.CharField(blank=True, max_length=255, null=True)),
('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.organization')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Employee',
fields=[
('status', models.IntegerField(default=1)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('created_by', models.IntegerField()),
('updated_by', models.IntegerField()),
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('name', models.CharField(blank=True, max_length=255, null=True)),
('employee_id', models.CharField(blank=True, max_length=45, null=True)),
('email', models.CharField(blank=True, max_length=255, null=True)),
('phone', models.CharField(blank=True, max_length=45, null=True)),
('departments', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.department')),
('location', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.location')),
('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.organization')),
('reporting_manager', models.ForeignKey(blank=True, db_column='reporting_manager', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.employee')),
],
options={
'abstract': False,
},
),
migrations.AddField(
model_name='department',
name='organization',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.organization'),
),
]
@@ -0,0 +1,73 @@
# Generated by Django 3.2 on 2022-06-21 13:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='department',
name='created_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='department',
name='updated_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='employee',
name='created_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='employee',
name='updated_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='location',
name='created_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='location',
name='updated_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='organization',
name='created_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='organization',
name='updated_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='productcategory',
name='created_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='productcategory',
name='updated_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='producttype',
name='created_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='producttype',
name='updated_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
]
@@ -0,0 +1,64 @@
# Generated by Django 3.2 on 2022-07-03 18:43
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0002_auto_20220621_1350'),
]
operations = [
migrations.CreateModel(
name='Address',
fields=[
('status', models.IntegerField(default=1)),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('created_by', models.CharField(blank=True, max_length=255, null=True)),
('updated_by', models.CharField(blank=True, max_length=255, null=True)),
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('address_line_one', models.TextField(blank=True, null=True)),
('address_line_two', models.TextField(blank=True, null=True)),
('country', models.CharField(blank=True, max_length=255, null=True)),
('state', models.CharField(blank=True, max_length=255, null=True)),
('city', models.CharField(blank=True, max_length=255, null=True)),
('pin_code', models.CharField(blank=True, max_length=255, null=True)),
],
options={
'abstract': False,
},
),
migrations.RemoveField(
model_name='location',
name='address_line_one',
),
migrations.RemoveField(
model_name='location',
name='address_line_two',
),
migrations.RemoveField(
model_name='location',
name='city',
),
migrations.RemoveField(
model_name='location',
name='country',
),
migrations.RemoveField(
model_name='location',
name='pin_code',
),
migrations.RemoveField(
model_name='location',
name='state',
),
migrations.AddField(
model_name='location',
name='address',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='dashboard.address'),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-07-05 13:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0003_auto_20220703_1843'),
]
operations = [
migrations.AddField(
model_name='location',
name='contact_person_email',
field=models.EmailField(blank=True, max_length=255, null=True),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-07-05 18:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0004_location_contact_person_email'),
]
operations = [
migrations.AlterField(
model_name='organization',
name='logo',
field=models.ImageField(blank=True, null=True, upload_to='logos'),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-08-30 07:25
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0005_alter_organization_logo'),
]
operations = [
migrations.RenameField(
model_name='productcategory',
old_name='product_category',
new_name='product_type',
),
]
@@ -0,0 +1,17 @@
# Generated by Django 3.2 on 2022-09-21 11:04
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0006_rename_product_category_productcategory_product_type'),
]
operations = [
migrations.RemoveField(
model_name='productcategory',
name='product_type',
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-09-28 09:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0007_remove_productcategory_product_type'),
]
operations = [
migrations.AddField(
model_name='producttype',
name='is_deleted',
field=models.BooleanField(default=False),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-09-29 07:34
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0008_producttype_is_deleted'),
]
operations = [
migrations.AddField(
model_name='producttype',
name='deleted',
field=models.BooleanField(default=False),
),
]
@@ -0,0 +1,17 @@
# Generated by Django 3.2 on 2022-09-29 07:49
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0009_producttype_deleted'),
]
operations = [
migrations.RemoveField(
model_name='producttype',
name='deleted',
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-09-29 10:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0010_remove_producttype_deleted'),
]
operations = [
migrations.AddField(
model_name='location',
name='is_deleted',
field=models.BooleanField(default=False),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-09-29 10:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0010_remove_producttype_deleted'),
]
operations = [
migrations.AddField(
model_name='productcategory',
name='is_deleted',
field=models.BooleanField(default=False),
),
]
@@ -0,0 +1,14 @@
# Generated by Django 3.2 on 2022-09-29 13:55
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0011_location_is_deleted'),
('dashboard', '0011_productcategory_is_deleted'),
]
operations = [
]
@@ -0,0 +1,14 @@
# Generated by Django 3.2 on 2022-09-30 05:13
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0011_location_is_deleted'),
('dashboard', '0011_productcategory_is_deleted'),
]
operations = [
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-09-29 13:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0012_merge_20220929_1355'),
]
operations = [
migrations.AddField(
model_name='department',
name='is_deleted',
field=models.BooleanField(default=False),
),
]
@@ -0,0 +1,14 @@
# Generated by Django 3.2 on 2022-10-06 11:12
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0012_merge_20220930_0513'),
('dashboard', '0013_department_is_deleted'),
]
operations = [
]
@@ -0,0 +1,16 @@
# Generated by Django 3.2 on 2022-10-13 12:20
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0014_merge_20221006_1112'),
]
operations = [
migrations.DeleteModel(
name='Employee',
),
]
@@ -0,0 +1,19 @@
# Generated by Django 3.2 on 2022-12-12 13:17
import dashboard.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0015_delete_employee'),
]
operations = [
migrations.AlterField(
model_name='organization',
name='logo',
field=models.ImageField(blank=True, null=True, upload_to=dashboard.models.path_and_rename),
),
]
@@ -0,0 +1,20 @@
# Generated by Django 3.2 on 2022-12-13 13:08
import dashboard.models
from django.db import migrations
import django_resized.forms
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0016_alter_organization_logo'),
]
operations = [
migrations.AlterField(
model_name='organization',
name='logo',
field=django_resized.forms.ResizedImageField(blank=True, crop=None, force_format='JPEG', keep_meta=True, null=True, quality=75, scale=None, size=[1024, 768], upload_to=dashboard.models.path_and_rename),
),
]
@@ -0,0 +1,43 @@
# Generated by Django 3.2 on 2023-01-04 09:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0017_alter_organization_logo'),
]
operations = [
migrations.AlterField(
model_name='address',
name='status',
field=models.BooleanField(default=True),
),
migrations.AlterField(
model_name='department',
name='status',
field=models.BooleanField(default=True),
),
migrations.AlterField(
model_name='location',
name='status',
field=models.BooleanField(default=True),
),
migrations.AlterField(
model_name='organization',
name='status',
field=models.BooleanField(default=True),
),
migrations.AlterField(
model_name='productcategory',
name='status',
field=models.BooleanField(default=True),
),
migrations.AlterField(
model_name='producttype',
name='status',
field=models.BooleanField(default=True),
),
]
@@ -0,0 +1,159 @@
# Generated by Django 3.2 on 2023-01-05 08:13
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import simple_history.models
import uuid
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('dashboard', '0018_auto_20230104_1455'),
]
operations = [
migrations.CreateModel(
name='HistoricalProductType',
fields=[
('status', models.BooleanField(default=True)),
('created_at', models.DateTimeField(blank=True, editable=False)),
('updated_at', models.DateTimeField(blank=True, editable=False)),
('created_by', models.CharField(blank=True, max_length=255, null=True)),
('updated_by', models.CharField(blank=True, max_length=255, null=True)),
('is_deleted', models.BooleanField(default=False)),
('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False)),
('name', models.CharField(blank=True, max_length=255, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('organization', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='dashboard.organization')),
],
options={
'verbose_name': 'historical product type',
'verbose_name_plural': 'historical product types',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalProductCategory',
fields=[
('status', models.BooleanField(default=True)),
('created_at', models.DateTimeField(blank=True, editable=False)),
('updated_at', models.DateTimeField(blank=True, editable=False)),
('created_by', models.CharField(blank=True, max_length=255, null=True)),
('updated_by', models.CharField(blank=True, max_length=255, null=True)),
('is_deleted', models.BooleanField(default=False)),
('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False)),
('name', models.CharField(blank=True, max_length=255, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('organization', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='dashboard.organization')),
],
options={
'verbose_name': 'historical product category',
'verbose_name_plural': 'historical product categorys',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalOrganization',
fields=[
('status', models.BooleanField(default=True)),
('created_at', models.DateTimeField(blank=True, editable=False)),
('updated_at', models.DateTimeField(blank=True, editable=False)),
('created_by', models.CharField(blank=True, max_length=255, null=True)),
('updated_by', models.CharField(blank=True, max_length=255, null=True)),
('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False)),
('name', models.CharField(blank=True, max_length=255, null=True)),
('website', models.CharField(blank=True, max_length=255, null=True)),
('email', models.CharField(blank=True, max_length=255, null=True)),
('phone', models.CharField(blank=True, max_length=255, null=True)),
('currency', models.CharField(blank=True, max_length=255, null=True)),
('date_format', models.CharField(blank=True, max_length=255, null=True)),
('logo', models.TextField(blank=True, max_length=100, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
],
options={
'verbose_name': 'historical organization',
'verbose_name_plural': 'historical organizations',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalLocation',
fields=[
('status', models.BooleanField(default=True)),
('created_at', models.DateTimeField(blank=True, editable=False)),
('updated_at', models.DateTimeField(blank=True, editable=False)),
('created_by', models.CharField(blank=True, max_length=255, null=True)),
('updated_by', models.CharField(blank=True, max_length=255, null=True)),
('is_deleted', models.BooleanField(default=False)),
('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False)),
('office_name', models.CharField(blank=True, max_length=255, null=True)),
('contact_person_name', models.CharField(blank=True, max_length=255, null=True)),
('contact_person_email', models.EmailField(blank=True, max_length=255, null=True)),
('contact_person_phone', models.CharField(blank=True, max_length=255, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('address', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='dashboard.address')),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('organization', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='dashboard.organization')),
],
options={
'verbose_name': 'historical location',
'verbose_name_plural': 'historical locations',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
migrations.CreateModel(
name='HistoricalDepartment',
fields=[
('status', models.BooleanField(default=True)),
('created_at', models.DateTimeField(blank=True, editable=False)),
('updated_at', models.DateTimeField(blank=True, editable=False)),
('created_by', models.CharField(blank=True, max_length=255, null=True)),
('updated_by', models.CharField(blank=True, max_length=255, null=True)),
('is_deleted', models.BooleanField(default=False)),
('id', models.UUIDField(db_index=True, default=uuid.uuid4, editable=False)),
('name', models.CharField(blank=True, max_length=255, null=True)),
('contact_person_name', models.CharField(blank=True, max_length=255, null=True)),
('contact_person_email', models.CharField(blank=True, max_length=255, null=True)),
('contact_person_phone', models.CharField(blank=True, max_length=255, null=True)),
('history_id', models.AutoField(primary_key=True, serialize=False)),
('history_date', models.DateTimeField(db_index=True)),
('history_change_reason', models.CharField(max_length=100, null=True)),
('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
('organization', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='dashboard.organization')),
],
options={
'verbose_name': 'historical department',
'verbose_name_plural': 'historical departments',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
]
View File