forked from uncloud/uncloud
amal
b7aa1c6971
- Implement a complete cycle for buying a Matrix Chat Host - Refactor the Payement cycle and stripe related methods
43 lines
2.2 KiB
Python
43 lines
2.2 KiB
Python
# Generated by Django 3.2.4 on 2021-07-05 06:52
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('uncloud_pay', '0014_auto_20210703_1747'),
|
|
('matrixhosting', '0003_auto_20210703_1523'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='VMSpecs',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('cores', models.IntegerField(default=1)),
|
|
('memory', models.IntegerField(default=2)),
|
|
('storage', models.IntegerField(default=100)),
|
|
('matrix_domain', models.CharField(max_length=255)),
|
|
('homeserver_domain', models.CharField(max_length=255)),
|
|
('webclient_domain', models.CharField(max_length=255)),
|
|
('is_open_registration', models.BooleanField(default=False, null=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='MatrixHostingOrder',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('vm_id', models.IntegerField(default=0)),
|
|
('created_at', models.DateTimeField(auto_now_add=True)),
|
|
('status', models.CharField(choices=[('draft', 'Draft'), ('declined', 'Declined'), ('approved', 'Approved')], default='draft', max_length=100)),
|
|
('stripe_charge_id', models.CharField(max_length=100, null=True)),
|
|
('price', models.FloatField()),
|
|
('billing_address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='uncloud_pay.billingaddress')),
|
|
('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_pay.stripecustomer')),
|
|
('specs', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='matrixhosting.vmspecs')),
|
|
('vm_pricing', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='matrixhosting.matrixvmpricing')),
|
|
],
|
|
),
|
|
]
|