from django.db import models
from rest_framework import serializers, generics
from django_filters.rest_framework import DjangoFilterBackend
from mama_care.models import *

class UserDevice(models.Model):
    token = models.TextField()
    createdDate = models.DateTimeField()
    updatedDate = models.DateTimeField()
    parentProfileId = models.ForeignKey(
        ParentProfile,
        on_delete=models.CASCADE,
        related_name="parentprofile_userdevice",
    )
    deviceOSTypeId = models.ForeignKey(
        DeviceOSType,
        on_delete=models.CASCADE,
        related_name="deviceostype_userdevice",
    )


class Notification(models.Model):
    title = models.TextField()
    body = models.TextField()
    createdDate = models.DateTimeField()
    updatedDate = models.DateTimeField()
    userDeviceId = models.ForeignKey(
        UserDevice,
        on_delete=models.CASCADE,
        related_name="userdevice_notification",
    )
