# Copyright (c) 2021, JINGROW
# License: MIT. See LICENSE

import jingrow

# import jingrow
from jingrow.model.page import Page


class UserGroup(Page):
	# begin: auto-generated types
	# This code is auto-generated. Do not modify anything in this block.

	from typing import TYPE_CHECKING

	if TYPE_CHECKING:
		from jingrow.core.pagetype.user_group_member.user_group_member import UserGroupMember
		from jingrow.types import DF

		user_group_members: DF.TableMultiSelect[UserGroupMember]

	# end: auto-generated types
	def after_insert(self):
		jingrow.cache.delete_key("user_groups")

	def on_trash(self):
		jingrow.cache.delete_key("user_groups")
