perf: 修改 applet 企业版

pull/11242/head
ibuler 1 year ago
parent 4e254493bc
commit a778a40b21

@ -0,0 +1,22 @@
# Generated by Django 4.1.10 on 2023-08-10 06:35
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('terminal', '0066_auto_20230810_1118'),
]
operations = [
migrations.RemoveField(
model_name='applet',
name='enterprise',
),
migrations.AddField(
model_name='applet',
name='edition',
field=models.CharField(choices=[('community', 'Community'), ('enterprise', 'Enterprise')], default='community', max_length=128, verbose_name='Edition'),
),
]

@ -33,7 +33,8 @@ class Applet(JMSBaseModel):
display_name = models.CharField(max_length=128, verbose_name=_('Display name'))
version = models.CharField(max_length=16, verbose_name=_('Version'))
author = models.CharField(max_length=128, verbose_name=_('Author'))
enterprise = models.BooleanField(default=False, verbose_name=_('Enterprise'))
edition = models.CharField(max_length=128, choices=Edition.choices, default=Edition.community,
verbose_name=_('Edition'))
type = models.CharField(max_length=16, verbose_name=_('Type'), default='general', choices=Type.choices)
is_active = models.BooleanField(default=True, verbose_name=_('Is active'))
builtin = models.BooleanField(default=False, verbose_name=_('Builtin'))

@ -35,6 +35,6 @@ class AppletSerializer(serializers.ModelSerializer):
'icon', 'readme', 'date_created', 'date_updated',
]
fields = fields_mini + [
'version', 'author', 'type', 'enterprise',
'version', 'author', 'type', 'edition',
'can_concurrent', 'protocols', 'tags', 'comment',
] + read_only_fields

Loading…
Cancel
Save