import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load, post_dump
from vrpmdvmonitoring import VRPMDV_Monitoring



class VRPMDV_MonitoringSchema(Schema):
        no = fields.Integer()
        id = fields.UUID()
        created_at = fields.DateTime("%m/%d/%Y, %H:%M")
        name = fields.String()
        samplerate = fields.Integer()
        sampleperiod = fields.Integer()
        downtime = fields.Integer()
        owner = fields.String()
        status = fields.String() 
        
        @post_load
        def make_vrpmdv_Monitoring(self, data, **kwargs):
            mon = VRPMDV_Monitoring(**data)
            #create the monitoring on the realtime side
            # mon.createMonitoring()
            return mon

              
            


