From 0f34fcaa03fec75987c1bb22159f8ffedbb14c9a Mon Sep 17 00:00:00 2001 From: Wu Chengyu <54303040+7086cmd@users.noreply.github.com> Date: Wed, 28 Feb 2024 03:00:27 +0800 Subject: [PATCH] fix: the problem of pydantic --- typings/group.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/typings/group.py b/typings/group.py index 63a7c3f..451ca39 100644 --- a/typings/group.py +++ b/typings/group.py @@ -1,7 +1,6 @@ from typing import Optional from pydantic import BaseModel, Field from enum import Enum -from typings.user import UserPosition from bson import ObjectId @@ -11,6 +10,16 @@ class GroupType(str, Enum): group = "group" +class UserPosition(str, Enum): + student = "student" + secretary = "secretary" + department = "department" + auditor = "auditor" + admin = "admin" + system = "system" + + + class Group(BaseModel): _id: ObjectId | str name: str