# Path: trigger/models.py
# class Trigger(models.Model):
#     name = models.CharField(max_length=50)
#     description = models.TextField()
#     channel = models.ForeignKey(Channel)
#     klass = models.CharField(max_length=50)
# 
#     def __str__(self):
#         return "{0} - {1}".format(self.channel.name, self.name)
# 
# Path: action/models.py
# class Action(models.Model):
#     name = models.CharField(max_length=50)
#     description = models.TextField()
#     channel = models.ForeignKey(Channel)
#     klass = models.CharField(max_length=50)
# 
#     def __str__(self):
#         return "{0} - {1}".format(self.channel.name, self.name)
# 
# Path: accounts/models.py
# class User(AbstractUser):
#     phone_number = models.CharField(max_length=15)


from django.db import models
from trigger.models import Trigger
from action.models import Action
from accounts.models import User


class Recipe(models.Model):
    user = models.ForeignKey(User)
    trigger = models.ForeignKey(Trigger)

# Path: trigger/models.py
# class Trigger(models.Model):
#     name = models.CharField(max_length=50)
#     description = models.TextField()
#     channel = models.ForeignKey(Channel)
#     klass = models.CharField(max_length=50)
# 
#     def __str__(self):
#         return "{0} - {1}".format(self.channel.name, self.name)
# 
# Path: action/models.py
# class Action(models.Model):
#     name = models.CharField(max_length=50)
#     description = models.TextField()
#     channel = models.ForeignKey(Channel)
#     klass = models.CharField(max_length=50)
# 
#     def __str__(self):
#         return "{0} - {1}".format(self.channel.name, self.name)
# 
# Path: accounts/models.py
# class User(AbstractUser):
#     phone_number = models.CharField(max_length=15)


# Path: recipe/models.py
from django.db import models
from trigger.models import Trigger
from action.models import Action
from accounts.models import User



class Recipe(models.Model):
    user = models.ForeignKey(User)
    trigger = models.ForeignKey(Trigger)

    action = models.ForeignKey(Action)