UnisKB/apps/system_manage/models/user_menu_setting.py

28 lines
823 B
Python
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# coding=utf-8
"""
@project: MaxKB
@AuthorCodex
@file user_menu_setting.py
@date2026/3/13
@desc: 用户菜单显示配置
"""
import uuid_utils.compat as uuid
from django.contrib.postgres.fields import ArrayField
from django.db import models
from common.mixins.app_model_mixin import AppModelMixin
from users.models import User
class UserMenuSetting(AppModelMixin):
"""
用户菜单显示配置
"""
id = models.UUIDField(primary_key=True, max_length=128, default=uuid.uuid7, editable=False, verbose_name="主键id")
user = models.OneToOneField(User, on_delete=models.CASCADE, verbose_name="用户")
menu_list = ArrayField(base_field=models.CharField(max_length=128), default=list, verbose_name="菜单列表")
class Meta:
db_table = "user_menu_setting"