2023-11-14 16:01:03 +00:00
|
|
|
# Generated by Django 4.2.5 on 2023-11-14 14:57
|
2023-10-03 03:47:00 +00:00
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2023-10-25 15:49:17 +00:00
|
|
|
name='File_datas',
|
2023-10-03 03:47:00 +00:00
|
|
|
fields=[
|
2023-10-16 17:08:18 +00:00
|
|
|
(
|
2023-10-25 15:49:17 +00:00
|
|
|
'id',
|
2023-10-16 17:08:18 +00:00
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
2023-10-25 15:49:17 +00:00
|
|
|
verbose_name='ID',
|
2023-10-16 17:08:18 +00:00
|
|
|
),
|
|
|
|
),
|
2023-10-25 15:49:17 +00:00
|
|
|
('file_name', models.CharField(max_length=250)),
|
|
|
|
('success', models.BooleanField(default=True)),
|
|
|
|
('created_at', models.DateTimeField(auto_now=True)),
|
2023-10-03 03:47:00 +00:00
|
|
|
],
|
|
|
|
),
|
2023-11-02 16:13:49 +00:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='Organization',
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
'id',
|
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name='ID',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
('name', models.CharField(max_length=250)),
|
|
|
|
(
|
|
|
|
'url',
|
|
|
|
models.CharField(
|
|
|
|
help_text='Url where to send the presentation', max_length=250
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2023-10-03 03:47:00 +00:00
|
|
|
migrations.CreateModel(
|
2023-10-25 15:49:17 +00:00
|
|
|
name='Rol',
|
2023-10-03 03:47:00 +00:00
|
|
|
fields=[
|
2023-10-16 17:08:18 +00:00
|
|
|
(
|
2023-10-25 15:49:17 +00:00
|
|
|
'id',
|
2023-10-16 17:08:18 +00:00
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
2023-10-25 15:49:17 +00:00
|
|
|
verbose_name='ID',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
('name', models.CharField(max_length=250)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Schemas',
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
'id',
|
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name='ID',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
('file_schema', models.CharField(max_length=250)),
|
|
|
|
('data', models.TextField()),
|
|
|
|
('created_at', models.DateTimeField(auto_now=True)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Service',
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
'id',
|
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name='ID',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
('domain', models.CharField(max_length=250)),
|
|
|
|
('description', models.CharField(max_length=250)),
|
|
|
|
('rol', models.ManyToManyField(to='idhub.rol')),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='VCTemplate',
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
'id',
|
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name='ID',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
('wkit_template_id', models.CharField(max_length=250)),
|
|
|
|
('data', models.TextField()),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2023-10-30 12:53:19 +00:00
|
|
|
name='VerificableCredential',
|
2023-10-25 15:49:17 +00:00
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
'id',
|
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name='ID',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
('id_string', models.CharField(max_length=250)),
|
|
|
|
('verified', models.BooleanField()),
|
|
|
|
('created_on', models.DateTimeField(auto_now=True)),
|
2023-10-26 11:33:13 +00:00
|
|
|
('issuer_on', models.DateTimeField(null=True)),
|
2023-10-25 15:49:17 +00:00
|
|
|
('did_issuer', models.CharField(max_length=250)),
|
|
|
|
('did_subject', models.CharField(max_length=250)),
|
|
|
|
('data', models.TextField()),
|
2023-10-26 11:33:13 +00:00
|
|
|
(
|
|
|
|
'status',
|
|
|
|
models.PositiveSmallIntegerField(
|
|
|
|
choices=[
|
2023-11-02 16:13:49 +00:00
|
|
|
(1, 'Enabled'),
|
2023-10-26 11:33:13 +00:00
|
|
|
(2, 'Issued'),
|
|
|
|
(3, 'Revoked'),
|
|
|
|
(4, 'Expired'),
|
|
|
|
],
|
|
|
|
default=1,
|
|
|
|
),
|
|
|
|
),
|
2023-10-25 15:49:17 +00:00
|
|
|
(
|
|
|
|
'user',
|
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
related_name='vcredentials',
|
|
|
|
to=settings.AUTH_USER_MODEL,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='UserRol',
|
|
|
|
fields=[
|
|
|
|
(
|
|
|
|
'id',
|
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name='ID',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
'service',
|
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
related_name='users',
|
|
|
|
to='idhub.service',
|
2023-10-16 17:08:18 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2023-10-25 15:49:17 +00:00
|
|
|
'user',
|
2023-10-16 17:08:18 +00:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2023-10-25 15:49:17 +00:00
|
|
|
related_name='roles',
|
2023-10-16 17:08:18 +00:00
|
|
|
to=settings.AUTH_USER_MODEL,
|
|
|
|
),
|
|
|
|
),
|
2023-10-03 03:47:00 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2023-10-25 15:49:17 +00:00
|
|
|
name='Membership',
|
2023-10-03 03:47:00 +00:00
|
|
|
fields=[
|
2023-10-16 17:08:18 +00:00
|
|
|
(
|
2023-10-25 15:49:17 +00:00
|
|
|
'id',
|
2023-10-16 17:08:18 +00:00
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
2023-10-25 15:49:17 +00:00
|
|
|
verbose_name='ID',
|
2023-10-16 17:08:18 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2023-10-25 15:49:17 +00:00
|
|
|
'type',
|
2023-10-16 17:08:18 +00:00
|
|
|
models.PositiveSmallIntegerField(
|
2023-10-25 15:49:17 +00:00
|
|
|
choices=[(1, 'Beneficiary'), (2, 'Employee'), (3, 'Partner')],
|
|
|
|
verbose_name='Type of membership',
|
2023-10-16 17:08:18 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2023-10-25 15:49:17 +00:00
|
|
|
'start_date',
|
2023-10-16 17:08:18 +00:00
|
|
|
models.DateField(
|
|
|
|
blank=True,
|
2023-10-25 15:49:17 +00:00
|
|
|
help_text='What date did the membership start?',
|
2023-10-16 17:08:18 +00:00
|
|
|
null=True,
|
2023-10-25 15:49:17 +00:00
|
|
|
verbose_name='Start date',
|
2023-10-16 17:08:18 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2023-10-25 15:49:17 +00:00
|
|
|
'end_date',
|
2023-10-16 17:08:18 +00:00
|
|
|
models.DateField(
|
|
|
|
blank=True,
|
2023-10-25 15:49:17 +00:00
|
|
|
help_text='What date did the membership end?',
|
2023-10-16 17:08:18 +00:00
|
|
|
null=True,
|
2023-10-25 15:49:17 +00:00
|
|
|
verbose_name='End date',
|
2023-10-16 17:08:18 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
2023-10-25 15:49:17 +00:00
|
|
|
'user',
|
2023-10-16 17:08:18 +00:00
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2023-10-25 15:49:17 +00:00
|
|
|
related_name='memberships',
|
2023-10-16 17:08:18 +00:00
|
|
|
to=settings.AUTH_USER_MODEL,
|
|
|
|
),
|
|
|
|
),
|
2023-10-03 03:47:00 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2023-10-25 15:49:17 +00:00
|
|
|
name='DID',
|
2023-10-03 03:47:00 +00:00
|
|
|
fields=[
|
2023-10-16 17:08:18 +00:00
|
|
|
(
|
2023-10-25 15:49:17 +00:00
|
|
|
'id',
|
2023-10-16 17:08:18 +00:00
|
|
|
models.BigAutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
2023-10-25 15:49:17 +00:00
|
|
|
verbose_name='ID',
|
2023-10-16 17:08:18 +00:00
|
|
|
),
|
|
|
|
),
|
2023-10-26 16:06:52 +00:00
|
|
|
('created_at', models.DateTimeField(auto_now=True)),
|
2023-10-25 15:49:17 +00:00
|
|
|
('label', models.CharField(max_length=50)),
|
2023-11-14 16:01:03 +00:00
|
|
|
('key_material', models.CharField(max_length=250)),
|
2023-10-16 17:08:18 +00:00
|
|
|
(
|
2023-10-25 15:49:17 +00:00
|
|
|
'user',
|
2023-10-16 17:08:18 +00:00
|
|
|
models.ForeignKey(
|
2023-10-26 11:33:13 +00:00
|
|
|
null=True,
|
2023-10-16 17:08:18 +00:00
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
2023-10-25 15:49:17 +00:00
|
|
|
related_name='dids',
|
2023-10-16 17:08:18 +00:00
|
|
|
to=settings.AUTH_USER_MODEL,
|
|
|
|
),
|
|
|
|
),
|
2023-10-03 03:47:00 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
]
|