# Path: cms/models.py
# class StandardPage(Page):
#     body = RichTextField(blank=True)
#     feed_image = models.ForeignKey(
#             'wagtailimages.Image',
#             null=True,
#             blank=True,
#             on_delete=models.SET_NULL,
#             related_name='+'
#     )
# 
#     search_fields = Page.search_fields + (
#         index.SearchField('intro'),
#         index.SearchField('body'),
#     )


from django.db import models
from taggit.models import TaggedItemBase
from wagtail.wagtailadmin.edit_handlers import FieldPanel
from wagtail.wagtailcore.models import Page
from wagtail.wagtailcore.models import Page, Orderable
from wagtail.wagtailforms.models import AbstractEmailForm, AbstractFormField
from wagtail.wagtailsnippets.models import register_snippet
from cms.models import StandardPage


@register_snippet
class Room(models.Model):
    name = models.CharField(max_length=255)
    capacity = models.IntegerField()
    # color todo
    # image todo

    panels = [
        FieldPanel('name'),
        FieldPanel('capacity'),
    ]

    def __str__(self):

# Path: cms/models.py
# class StandardPage(Page):
#     body = RichTextField(blank=True)
#     feed_image = models.ForeignKey(
#             'wagtailimages.Image',
#             null=True,
#             blank=True,
#             on_delete=models.SET_NULL,
#             related_name='+'
#     )
# 
#     search_fields = Page.search_fields + (
#         index.SearchField('intro'),
#         index.SearchField('body'),
#     )


# Path: room_booking/models.py
from django.db import models
from taggit.models import TaggedItemBase
from wagtail.wagtailadmin.edit_handlers import FieldPanel
from wagtail.wagtailcore.models import Page
from wagtail.wagtailcore.models import Page, Orderable
from wagtail.wagtailforms.models import AbstractEmailForm, AbstractFormField
from wagtail.wagtailsnippets.models import register_snippet
from cms.models import StandardPage



@register_snippet
class Room(models.Model):
    name = models.CharField(max_length=255)
    capacity = models.IntegerField()
    # color todo
    # image todo

    panels = [
        FieldPanel('name'),
        FieldPanel('capacity'),
    ]

    def __str__(self):

        return self.name