# .....
# ------------------------------------------------------- # -------------------------------------------------------
# ITEM :: it's all about the feed-items
#
# Hunter => Shoots items to kill them twice
# Storer => Stores the items (the really precious, new ones only)
# Alchemist => Turns item-data into wisdom
# Callgirl => Her wisdom turns you on
# ------------------------------------------------------- # -------------------------------------------------------
class FpgItem(FPGBase):
'''
'''
# REQUIRED
# _id
item_feed = fields.ReferenceField(FpgFeed)
#
item_title = fields.CharField(required=True)
item_content = fields.CharField(required=True)
# summary, content,
item_link = fields.URLField(required=True)
# the real thing
item_date = fields.CharField(required=True)
# published, updated, feed_date_string
item_date_parsed = fields.DateTimeField(required=True)
# published_parsed, updated_parsed, feed_date_parsed, utc.now()
# OPTIONAL
item_media = fields.EmbeddedDocumentListField(FpgMedia, required=False)
# media_content, media_thumbnail, ALSO: content => src=
class Meta:
indexes = [
# pymongo.IndexModel([('url', pymongo.ASCENDING)], unique=True)
# ItemTxTindex
pymongo.IndexModel([('item_title', pymongo.TEXT), ('item_content', pymongo.TEXT)],
# **kwargs
name="ItemTxTindex",
#weights=[('item_title',50),('item_content',30)],
#pymongo.weights=[('item_title',50),('item_content',30)],
#pymongo.WEIGHTS=[('item_title',50),('item_content',30)],
#
background=True,
unique=False
) #
] # indexes
# .....