# Copyright (c) 2021, JINGROW
# For license information, please see license.txt
from __future__ import annotations

import jingrow
from jingrow.model.page import Page


class MailLog(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.types import DF

		date: DF.Date | None
		log: DF.Code | None
		message: DF.Code | None
		message_id: DF.Data | None
		recipient: DF.Data | None
		sender: DF.Data | None
		site: DF.Data | None
		status: DF.Data | None
		subscription_key: DF.Data | None
		unique_token: DF.Data | None
	# end: auto-generated types

	pass


def on_pagetype_update():
	jingrow.db.add_index("Mail Log", ["site", "status"])
	jingrow.db.add_index("Mail Log", ["site", "creation"])
