32 lines
1.5 KiB
Plaintext
32 lines
1.5 KiB
Plaintext
-- SPDX-FileCopyrightText: 2022 Steffen Jost <jost@tcs.ifi.lmu.de>
|
|
--
|
|
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
PrintJob
|
|
name Text
|
|
apcIdent Text default='unknown'
|
|
filename FilePath
|
|
file ByteString -- stores plain pdf; otherwise use FileContentReference Maybe
|
|
created UTCTime
|
|
acknowledged UTCTime Maybe
|
|
recipient UserId Maybe OnDeleteSetNull OnUpdateCascade -- optional as some letters may contain just an address
|
|
affected UserId Maybe OnDeleteSetNull OnUpdateCascade -- subject of the letter
|
|
sender UserId Maybe OnDeleteSetNull OnUpdateCascade -- senders and associations are optional
|
|
course CourseId Maybe OnDeleteCascade OnUpdateCascade
|
|
qualification QualificationId Maybe OnDeleteCascade OnUpdateCascade
|
|
lmsUser LmsIdent Maybe OnDeleteSetNull OnUpdateCascade -- allows tracking if recipient has been notified; must be unique
|
|
-- UniquePrintJobLmsUser lmsUser -- Note that in fact multiple print jobs per LMS user are possible!
|
|
-- UniquePrintJobApcIdent apcIdent -- TODO: not yet enforced, since LmsIdent is currently used
|
|
deriving Generic Show
|
|
|
|
PrintAcknowledge -- just to store acknowledging requests to be evaluated by a background job later on
|
|
apcIdent Text
|
|
timestamp UTCTime default=now()
|
|
processed Bool
|
|
deriving Generic Show
|
|
|
|
PrintAckIdAlias
|
|
needle Text
|
|
replacement Text
|
|
priority Int
|
|
deriving Generic Show |