mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-06 18:00:57 +00:00
perf: 添加migrations
This commit is contained in:
24
apps/common/migrations/0007_permission.py
Normal file
24
apps/common/migrations/0007_permission.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# Generated by Django 3.1.14 on 2022-02-23 08:42
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('common', '0006_auto_20190304_1515'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Permission',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
],
|
||||
options={
|
||||
'permissions': [('view_resourcestatistics', 'Can view resource statistics')],
|
||||
},
|
||||
),
|
||||
]
|
9
apps/common/models.py
Normal file
9
apps/common/models.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from django.db import models
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
|
||||
class Permission(models.Model):
|
||||
class Meta:
|
||||
permissions = [
|
||||
('view_resourcestatistics', _('Can view resource statistics'))
|
||||
]
|
Reference in New Issue
Block a user