MCPcopy Create free account
hub / github.com/cxapython/catvm / CommonFieldMixin

Class CommonFieldMixin

selenium/shannon_spider/db.py:25–31  ·  view source on GitHub ↗

所有orm model 必须mixin这些公有的字段

Source from the content-addressed store, hash-verified

23ItemBaseModel = declarative_base() # ItemBaseModel这是所有Item的基类
24
25class CommonFieldMixin(object):
26 '''
27 所有orm model 必须mixin这些公有的字段
28 '''
29 id = Column(Integer, primary_key=True, autoincrement=True)
30 url_sha = Column(CHAR(40), index=True, nullable=False)
31 sha = Column(CHAR(40), index=True, unique=True, nullable=True)
32
33engine = create_engine(
34 settings['CRAWLED_DATABASE'],

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected