<s> from breezeminder . app import app <EOL> from breezeminder . models . base import ( BaseDocument , <EOL> BaseQuerySet ) <EOL> class AlertQuerySet ( BaseQuerySet ) : <EOL> pass <EOL> class Alert ( BaseDocument ) : <EOL> message = app . db . StringField ( required = True ) <EOL> is_active = app . db . BooleanField ( required = True , default = True ) <EOL> start = app . db . DateTimeField ( required = True ) <EOL> end = app . db . DateTimeField ( required = True ) <EOL> level = app . db . StringField ( default = '<STR_LIT:info>' ) <EOL> meta = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : AlertQuerySet , <EOL> '<STR_LIT>' : [ <EOL> ( '<STR_LIT:start>' , '<STR_LIT:end>' ) <EOL> ] <EOL> } <EOL> def disable ( self ) : <EOL> self . is_active = False <EOL> self . save ( ) <EOL> def enable ( self ) : <EOL> self . is_active = True <EOL> self . save ( ) </s>
