Files
cdtestplant_v1/apps/dict/fragment/fragmentOperation.py
2025-04-29 18:09:00 +08:00

13 lines
415 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 该类主要传入文档片段列表,对列表进行数据组装等工作
from django.db.models import QuerySet
# Models
from apps.dict.models import Fragment
class FragmentOperation(object):
def __init__(self, fragments: QuerySet[Fragment] = None):
self.__fragments = fragments # 初始化必须传入Fragment-Model对象
@property
def fragment(self):
return self.__fragments