Files
api-bashgah/apps/product/migrations/0001_initial.py
T
2026-06-15 10:57:28 +03:30

39 lines
1.5 KiB
Python

# Generated by Django 4.2.1 on 2024-03-27 13:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='ProductCategory',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
('image', models.ImageField(blank=True, null=True, upload_to='product_category/')),
('is_enable', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='Product',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
('price', models.PositiveIntegerField()),
('emtiyaz', models.PositiveIntegerField()),
('desc', models.TextField(blank=True, null=True)),
('image', models.ImageField(blank=True, null=True, upload_to='product/')),
('is_enable', models.BooleanField(default=True)),
('quantity', models.PositiveIntegerField(blank=True, null=True)),
('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='product_category', to='product.productcategory')),
],
),
]