mirror of https://github.com/jumpserver/jumpserver
109 lines
3.6 KiB
Python
109 lines
3.6 KiB
Python
# Generated by Django 4.1.13 on 2024-12-04 08:27
|
|
|
|
import common.db.fields
|
|
import common.db.utils
|
|
from django.db import migrations, models
|
|
import private_storage.fields
|
|
import private_storage.storage.files
|
|
import uuid
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("accounts", "0018_changesecretrecord_ignore_fail_and_more"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="IntegrationApplication",
|
|
fields=[
|
|
(
|
|
"created_by",
|
|
models.CharField(
|
|
blank=True, max_length=128, null=True, verbose_name="Created by"
|
|
),
|
|
),
|
|
(
|
|
"updated_by",
|
|
models.CharField(
|
|
blank=True, max_length=128, null=True, verbose_name="Updated by"
|
|
),
|
|
),
|
|
(
|
|
"date_created",
|
|
models.DateTimeField(
|
|
auto_now_add=True, null=True, verbose_name="Date created"
|
|
),
|
|
),
|
|
(
|
|
"date_updated",
|
|
models.DateTimeField(auto_now=True, verbose_name="Date updated"),
|
|
),
|
|
(
|
|
"comment",
|
|
models.TextField(blank=True, default="", verbose_name="Comment"),
|
|
),
|
|
(
|
|
"id",
|
|
models.UUIDField(
|
|
default=uuid.uuid4, primary_key=True, serialize=False
|
|
),
|
|
),
|
|
(
|
|
"org_id",
|
|
models.CharField(
|
|
blank=True,
|
|
db_index=True,
|
|
default="",
|
|
max_length=36,
|
|
verbose_name="Organization",
|
|
),
|
|
),
|
|
("name", models.CharField(max_length=128, verbose_name="Name")),
|
|
(
|
|
"logo",
|
|
private_storage.fields.PrivateImageField(
|
|
max_length=128,
|
|
storage=private_storage.storage.files.PrivateFileSystemStorage(),
|
|
upload_to="integration-apps",
|
|
verbose_name="Logo",
|
|
),
|
|
),
|
|
(
|
|
"secret",
|
|
common.db.fields.EncryptTextField(
|
|
default="", verbose_name="Secret"
|
|
),
|
|
),
|
|
(
|
|
"accounts",
|
|
common.db.fields.JSONManyToManyField(
|
|
default=dict, to="accounts.Account", verbose_name="Accounts"
|
|
),
|
|
),
|
|
(
|
|
"ip_group",
|
|
models.JSONField(
|
|
default=common.db.utils.default_ip_group,
|
|
verbose_name="IP group",
|
|
),
|
|
),
|
|
(
|
|
"date_last_used",
|
|
models.DateTimeField(
|
|
blank=True, null=True, verbose_name="Date last used"
|
|
),
|
|
),
|
|
("is_active", models.BooleanField(default=True, verbose_name="Active")),
|
|
],
|
|
options={
|
|
"verbose_name": "Integration App",
|
|
"unique_together": {("name", "org_id")},
|
|
},
|
|
),
|
|
migrations.DeleteModel(
|
|
name="ServiceIntegration",
|
|
),
|
|
]
|