initial work on comparison
This commit is contained in:
parent
06b4cba4bc
commit
4cffe5a9e3
6 changed files with 358 additions and 2 deletions
127
hub/services/migrations/0031_externalpriceplans.py
Normal file
127
hub/services/migrations/0031_externalpriceplans.py
Normal file
|
@ -0,0 +1,127 @@
|
|||
# Generated by Django 5.2 on 2025-05-27 14:52
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("services", "0030_serviceoffering_msp"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name="ExternalPricePlans",
|
||||
fields=[
|
||||
(
|
||||
"id",
|
||||
models.BigAutoField(
|
||||
auto_created=True,
|
||||
primary_key=True,
|
||||
serialize=False,
|
||||
verbose_name="ID",
|
||||
),
|
||||
),
|
||||
("plan_name", models.CharField()),
|
||||
(
|
||||
"description",
|
||||
models.CharField(blank=True, max_length=200, null=True),
|
||||
),
|
||||
("source", models.URLField(blank=True, null=True)),
|
||||
("date_retrieved", models.DateField(blank=True, null=True)),
|
||||
(
|
||||
"currency",
|
||||
models.CharField(
|
||||
choices=[
|
||||
("CHF", "Swiss Franc"),
|
||||
("EUR", "Euro"),
|
||||
("USD", "US Dollar"),
|
||||
],
|
||||
default="CHF",
|
||||
max_length=3,
|
||||
),
|
||||
),
|
||||
(
|
||||
"term",
|
||||
models.CharField(
|
||||
choices=[
|
||||
("MTH", "per Month (30d)"),
|
||||
("DAY", "per Day"),
|
||||
("HR", "per Hour"),
|
||||
("MIN", "per Minute"),
|
||||
],
|
||||
default="MTH",
|
||||
max_length=3,
|
||||
),
|
||||
),
|
||||
(
|
||||
"amount",
|
||||
models.DecimalField(
|
||||
decimal_places=4,
|
||||
help_text="Price per unit in the specified currency, excl. VAT",
|
||||
max_digits=10,
|
||||
),
|
||||
),
|
||||
(
|
||||
"vcpus",
|
||||
models.FloatField(
|
||||
blank=True, help_text="Number of included vCPUs", null=True
|
||||
),
|
||||
),
|
||||
(
|
||||
"ram",
|
||||
models.FloatField(
|
||||
blank=True, help_text="Amount of GiB RAM included", null=True
|
||||
),
|
||||
),
|
||||
(
|
||||
"storage",
|
||||
models.FloatField(
|
||||
blank=True, help_text="Amount of GiB included", null=True
|
||||
),
|
||||
),
|
||||
("competitor_sla", models.CharField(blank=True, null=True)),
|
||||
("replicas", models.IntegerField(blank=True, null=True)),
|
||||
(
|
||||
"cloud_provider",
|
||||
models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="external_price",
|
||||
to="services.cloudprovider",
|
||||
),
|
||||
),
|
||||
(
|
||||
"compare_to",
|
||||
models.ManyToManyField(
|
||||
blank=True,
|
||||
null=True,
|
||||
related_name="external_prices",
|
||||
to="services.computeplan",
|
||||
),
|
||||
),
|
||||
(
|
||||
"service",
|
||||
models.ForeignKey(
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="external_price",
|
||||
to="services.service",
|
||||
),
|
||||
),
|
||||
(
|
||||
"vshn_appcat_price",
|
||||
models.ForeignKey(
|
||||
blank=True,
|
||||
help_text="Specific VSHN AppCat price configuration to compare against",
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
related_name="external_comparisons",
|
||||
to="services.vshnappcatprice",
|
||||
),
|
||||
),
|
||||
],
|
||||
options={
|
||||
"verbose_name": "External Price",
|
||||
},
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue