Esempio n. 1
0
class AggregatedActivity(Model):
    __table_name__ = "aggregated"
    feed_id = columns.Ascii(primary_key=True, partition_key=True)
    group = columns.Ascii(primary_key=True, partition_key=True)
    updated_at = columns.DateTime(primary_key=True, clustering_order='desc')
    activity_id = columns.TimeUUID(required=True)
    activities = columns.Bytes(required=False)
    created_at = columns.DateTime(required=False)
Esempio n. 2
0
class AggregatedActivity(BaseActivity):
    activities = columns.Bytes(required=False)
    created_at = columns.DateTime(required=False)
    group = columns.Ascii(required=False)
    updated_at = columns.DateTime(required=False)
    seen_at = columns.DateTime(required=False)
    read_at = columns.DateTime(required=False)
Esempio n. 3
0
class BaseActivity(Model):
    feed_id = columns.Ascii(primary_key=True, partition_key=True)
    activity_id = columns.TimeUUID(primary_key=True, clustering_order='desc')
Esempio n. 4
0
class BaseActivity(Model):
    # partition key (1 row per user_id)
    feed_id = columns.Ascii(primary_key=True)
    # clustering key (used for sorting)
    activity_id = VarInt(primary_key=True)