Skip to content

Class peagen.orm.abuse_record.AbuseRecord

peagen.orm.abuse_record.AbuseRecord

Bases: Base, GUIDPk, Timestamped, Ownable

Track abuse metrics for a given IP address. • id – surrogate UUID PK (from GUIDPk) • created_at – first_seen (from Timestamped) • updated_at – maintained automatically (from Timestamped) • owner_id – who owns this record (from Ownable)

ip class-attribute instance-attribute

ip = acol(
    storage=S(
        String, nullable=False, unique=True, index=True
    )
)

count class-attribute instance-attribute

count = acol(storage=S(Integer, nullable=False, default=0))

banned class-attribute instance-attribute

banned = acol(
    storage=S(Boolean, nullable=False, default=False)
)

owner class-attribute instance-attribute

owner = relationship(User, lazy='selectin')