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
+37
View File
@@ -0,0 +1,37 @@
# 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 = [
('dashboard', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Product',
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)),
('manufacturer', models.CharField(blank=True, max_length=255, null=True)),
('description', 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.productcategory')),
('product_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='dashboard.producttype')),
],
options={
'abstract': False,
},
),
]
@@ -0,0 +1,23 @@
# Generated by Django 3.2 on 2022-06-21 13:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='product',
name='created_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
migrations.AlterField(
model_name='product',
name='updated_by',
field=models.CharField(blank=True, max_length=255, null=True),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-07-03 18:43
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0002_auto_20220621_1350'),
]
operations = [
migrations.AddField(
model_name='product',
name='deleted',
field=models.BooleanField(default=False),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-09-22 10:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0003_product_deleted'),
]
operations = [
migrations.AddField(
model_name='product',
name='product_pic',
field=models.ImageField(blank=True, null=True, upload_to='product_pic'),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-09-22 11:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0004_product_product_pic'),
]
operations = [
migrations.AlterField(
model_name='product',
name='product_pic',
field=models.ImageField(blank=True, null=True, upload_to='product_pics'),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-09-26 06:55
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('products', '0005_alter_product_product_pic'),
]
operations = [
migrations.RenameField(
model_name='product',
old_name='product_pic',
new_name='product_picture',
),
]
@@ -0,0 +1,19 @@
# Generated by Django 3.2 on 2022-09-27 06:55
from django.db import migrations, models
import products.models
class Migration(migrations.Migration):
dependencies = [
('products', '0006_rename_product_pic_product_product_picture'),
]
operations = [
migrations.AlterField(
model_name='product',
name='product_picture',
field=models.ImageField(blank=True, null=True, upload_to=products.models.path_and_rename),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-09-28 09:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('products', '0007_alter_product_product_picture'),
]
operations = [
migrations.RenameField(
model_name='product',
old_name='deleted',
new_name='is_deleted',
),
]
@@ -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 = [
('products', '0008_rename_deleted_product_is_deleted'),
]
operations = [
migrations.AddField(
model_name='product',
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 = [
('products', '0009_product_deleted'),
]
operations = [
migrations.RemoveField(
model_name='product',
name='deleted',
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2022-11-29 05:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0010_remove_product_deleted'),
]
operations = [
migrations.AlterField(
model_name='product',
name='description',
field=models.TextField(blank=True, null=True),
),
]
@@ -0,0 +1,20 @@
# Generated by Django 3.2 on 2022-12-13 13:08
from django.db import migrations
import django_resized.forms
import products.models
class Migration(migrations.Migration):
dependencies = [
('products', '0011_alter_product_description'),
]
operations = [
migrations.AlterField(
model_name='product',
name='product_picture',
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=products.models.path_and_rename),
),
]
@@ -0,0 +1,18 @@
# Generated by Django 3.2 on 2023-01-04 09:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('products', '0012_alter_product_product_picture'),
]
operations = [
migrations.AlterField(
model_name='product',
name='status',
field=models.BooleanField(default=True),
),
]
@@ -0,0 +1,50 @@
# Generated by Django 3.2 on 2023-01-04 14:16
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 = [
('dashboard', '0018_auto_20230104_1455'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('products', '0013_alter_product_status'),
]
operations = [
migrations.CreateModel(
name='HistoricalProduct',
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)),
('product_picture', models.TextField(blank=True, max_length=100, null=True)),
('manufacturer', models.CharField(blank=True, max_length=255, null=True)),
('description', models.TextField(blank=True, 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')),
('product_category', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='dashboard.productcategory')),
('product_type', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='dashboard.producttype')),
],
options={
'verbose_name': 'historical product',
'verbose_name_plural': 'historical products',
'ordering': ('-history_date', '-history_id'),
'get_latest_by': ('history_date', 'history_id'),
},
bases=(simple_history.models.HistoricalChanges, models.Model),
),
]
View File