feat(pricing): add workspace user rates and price units
This commit is contained in:
45
apps/workspaces/migrations/0004_priceunit.py
Normal file
45
apps/workspaces/migrations/0004_priceunit.py
Normal file
@@ -0,0 +1,45 @@
|
||||
import uuid
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("workspaces", "0003_remove_workspaceuserrate_workspaceuserrate_id_idx_and_more"),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="PriceUnit",
|
||||
fields=[
|
||||
("id", models.UUIDField(default=uuid.uuid7, primary_key=True, serialize=False)),
|
||||
("created_at", models.DateTimeField(auto_now_add=True)),
|
||||
("updated_at", models.DateTimeField(auto_now=True)),
|
||||
("deleted_at", models.DateTimeField(blank=True, null=True)),
|
||||
("is_deleted", models.BooleanField(default=False)),
|
||||
("is_active", models.BooleanField(default=False)),
|
||||
("code", models.CharField(max_length=8, unique=True)),
|
||||
("name", models.CharField(max_length=64)),
|
||||
("local_name", models.CharField(blank=True, max_length=64)),
|
||||
("symbol", models.CharField(blank=True, max_length=16)),
|
||||
("created_by", models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="created_workspaces_priceunit_set", to=settings.AUTH_USER_MODEL)),
|
||||
("updated_by", models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="updated_workspaces_priceunit_set", to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
options={
|
||||
"db_table": "price_unit",
|
||||
"ordering": ("code",),
|
||||
},
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="priceunit",
|
||||
index=models.Index(fields=["id"], name="priceunit_id_idx"),
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="priceunit",
|
||||
index=models.Index(fields=["code"], name="price_unit_code_idx"),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user