当前位置: 首页>>代码示例>>Python>>正文


Python Schema.addEntity方法代码示例

本文整理汇总了Python中schema.Schema.addEntity方法的典型用法代码示例。如果您正苦于以下问题:Python Schema.addEntity方法的具体用法?Python Schema.addEntity怎么用?Python Schema.addEntity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在schema.Schema的用法示例。


在下文中一共展示了Schema.addEntity方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: generateEntities

# 需要导入模块: from schema import Schema [as 别名]
# 或者: from schema.Schema import addEntity [as 别名]
	def generateEntities(self):
		schema = Schema('testMongoGen')

		# query = {'Field': {'$gt': 0, '$lt': 2}}
		# db.Items.find({"Status": {$gt:0, $lt:2, $ne:0}}).pretty()
		
		memTemplate = schema.addEntity('Items')
		memTemplate.addIdProperty(is_auto = False)
		memTemplate.addStringProperty('Name')
		memTemplate.addStringProperty('Path')
		memTemplate.addStringProperty('AssetSubscription')
		memTemplate.addStringProperty('SuperAssetSubscription')
		memTemplate.addStringProperty('DigitalMediaSubscription')
		memTemplate.addStringProperty('ArtSubscription')
		memTemplate.addStringProperty('UserSubscription')
		memTemplate.addStringProperty('Type')
		memTemplate.addStringProperty('Format')
		memTemplate.addIntProperty('Status')
		memTemplate.addFloatProperty('Version')
		
		memTemplate = schema.addEntity('Assets')
		#memTemplate.addIdProperty(is_auto = True)
		memTemplate.addStringProperty('Name')
		memTemplate.addStringProperty('Path')
		memTemplate.addStringProperty('ItemSubscription')
		memTemplate.addStringProperty('ProyectSubscription')
		memTemplate.addStringProperty('SuperAssetSubscription')
		memTemplate.addStringProperty('ShotSubscription')
		memTemplate.addStringProperty('SequenceSubscription')
		memTemplate.addStringProperty('DigitalMediaSubscription')
		memTemplate.addStringProperty('TaskSubscription')
		memTemplate.addStringProperty('UserSubscription')
		memTemplate.addStringProperty('Type')
		memTemplate.addStringProperty('Format')
		memTemplate.addIntProperty('Status')
		
		memTemplate = schema.addEntity('SuperAssets')
		#memTemplate.addIdProperty(is_auto = True)
		memTemplate.addStringProperty('Name')
		memTemplate.addStringProperty('Path')
		memTemplate.addStringProperty('ItemSubscription')
		memTemplate.addStringProperty('AssetSubscription')
		memTemplate.addStringProperty('DigitalMediaSubscription')
		memTemplate.addStringProperty('ShotSubscription')
		memTemplate.addStringProperty('SequenceSubscription')
		memTemplate.addStringProperty('ProyectSubscription')
		memTemplate.addStringProperty('TaskSubscription')
		memTemplate.addStringProperty('UserSubscription')
		memTemplate.addStringProperty('Type')
		memTemplate.addStringProperty('Format')
		memTemplate.addIntProperty('Status')
		
		daoGenerator = DaoGenerator()
		daoGenerator.generateAll(schema, self.PROJECT_DIR + '/test/model', '192.168.0.189:20017')
开发者ID:HuevoCartoonStudio,项目名称:mongoGenerator,代码行数:56,代码来源:main_asset_manager_generator.py

示例2: generateEntities

# 需要导入模块: from schema import Schema [as 别名]
# 或者: from schema.Schema import addEntity [as 别名]
	def generateEntities(self):
		schema = Schema('assetmanagerdb')
		
		memTemplate = schema.addEntity('Items')
		#memTemplate.addIdProperty(is_auto = True)
		memTemplate.addStringProperty('Name')
		memTemplate.addStringProperty('Path')
		memTemplate.addStringProperty('AssetSubscription')
		memTemplate.addStringProperty('SuperAssetSubscription')
		memTemplate.addStringProperty('DigitalMediaSubscription')
		memTemplate.addStringProperty('ArtSubscription')
		memTemplate.addStringProperty('UserSubscription')
		memTemplate.addStringProperty('Type')
		memTemplate.addStringProperty('Format')
		memTemplate.addIntProperty('Status')
		memTemplate.addFloatProperty('Version')
		
		memTemplate = schema.addEntity('Assets')
		#memTemplate.addIdProperty(is_auto = True)
		memTemplate.addStringProperty('Name')
		memTemplate.addStringProperty('Path')
		memTemplate.addStringProperty('ItemSubscription')
		memTemplate.addStringProperty('ProyectSubscription')
		memTemplate.addStringProperty('SuperAssetSubscription')
		memTemplate.addStringProperty('ShotSubscription')
		memTemplate.addStringProperty('SequenceSubscription')
		memTemplate.addStringProperty('DigitalMediaSubscription')
		memTemplate.addStringProperty('TaskSubscription')
		memTemplate.addStringProperty('UserSubscription')
		memTemplate.addStringProperty('Type')
		memTemplate.addStringProperty('Format')
		memTemplate.addIntProperty('Status')
		
		memTemplate = schema.addEntity('SuperAssets')
		#memTemplate.addIdProperty(is_auto = True)
		memTemplate.addStringProperty('Name')
		memTemplate.addStringProperty('Path')
		memTemplate.addStringProperty('ItemSubscription')
		memTemplate.addStringProperty('AssetSubscription')
		memTemplate.addStringProperty('DigitalMediaSubscription')
		memTemplate.addStringProperty('ShotSubscription')
		memTemplate.addStringProperty('SequenceSubscription')
		memTemplate.addStringProperty('ProyectSubscription')
		memTemplate.addStringProperty('TaskSubscription')
		memTemplate.addStringProperty('UserSubscription')
		memTemplate.addStringProperty('Type')
		memTemplate.addStringProperty('Format')
		memTemplate.addIntProperty('Status')
		
		daoGenerator = DaoGenerator()
		daoGenerator.generateAll(schema, self.PROJECT_DIR + '/test/model')
开发者ID:raulrn,项目名称:mongoGenerator,代码行数:53,代码来源:main_asset_manager_generator.py

示例3: generateEntities

# 需要导入模块: from schema import Schema [as 别名]
# 或者: from schema.Schema import addEntity [as 别名]
	def generateEntities(self):
		schema = Schema('greenmodel')
		
		memTemplate = schema.addEntity('MemorandumTemplates')
		memTemplate.addIdProperty()
		memTemplate.addStringProperty('name')
		
		#try:
		daoGenerator = DaoGenerator()
		daoGenerator.generateAll(schema, self.PROJECT_DIR + '/test/model')
开发者ID:HuevoCartoonStudio,项目名称:mongoGenerator,代码行数:12,代码来源:main.py

示例4: generate_entities

# 需要导入模块: from schema import Schema [as 别名]
# 或者: from schema.Schema import addEntity [as 别名]
    def generate_entities(self):
        schema = Schema('mongodbtest6')

        doc_template = schema.addEntity('Users')
        doc_template.addIdProperty(is_auto=False)
        doc_template.addStringProperty('Name')
        doc_template.addListProperty('Subs')
        # memTemplate.addBoolProperty('IsValid')

        # try:
        dao_generator = DaoGenerator()
        dao_generator.generateAll(schema, self.PROJECT_DIR + '/test/model')
开发者ID:HuevoCartoonStudio,项目名称:mongoGenerator,代码行数:14,代码来源:main_generator.py

示例5: generateEntities

# 需要导入模块: from schema import Schema [as 别名]
# 或者: from schema.Schema import addEntity [as 别名]
    def generateEntities(self):
        schema = Schema('testMongoAppend')

        # query = {'Field': {'$gt': 0, '$lt': 2}}
        # db.Items.find({"Status": {$gt:0, $lt:2, $ne:0}}).pretty()

        memTemplate = schema.addEntity('ItemsTest')
        memTemplate.addIdProperty(is_auto=False)
        memTemplate.addStringProperty('Name')
        memTemplate.addStringProperty('Path')

        daoGenerator = DaoGenerator()
        daoGenerator.generateAll(schema, self.PROJECT_DIR + '/test/model', '192.168.0.189:20017')
开发者ID:HuevoCartoonStudio,项目名称:mongoGenerator,代码行数:15,代码来源:main_append_generator.py

示例6: generateEntities

# 需要导入模块: from schema import Schema [as 别名]
# 或者: from schema.Schema import addEntity [as 别名]
    def generateEntities(self):
        schema = Schema('testMongoGen')

        # query = {'Field': {'$gt': 0, '$lt': 2}}
        # db.Items.find({"Status": {$gt:0, $lt:2, $ne:0}}).pretty()

        memTemplate = schema.addEntity('Items')
        # memTemplate.addIdProperty(is_auto=False)
        memTemplate.addStringProperty('Class')
        memTemplate.addStringProperty('Name')
        memTemplate.addStringProperty('Path')
        memTemplate.addStringProperty('DateTime')
        memTemplate.addIntProperty('Type')
        memTemplate.addIntProperty('Format')
        memTemplate.addIntProperty('Status')
        memTemplate.addFloatProperty('Version')
        memTemplate.addStringProperty('PrevVersion')
        memTemplate.addStringProperty('NextVersion')
        memTemplate.addListProperty('UserSubscription')
        memTemplate.addListProperty('TaskSubscription')

        memTemplate.addListProperty('ProyectSubscription')
        memTemplate.addListProperty('SequenceSubscription')
        memTemplate.addListProperty('ShotSubscription')
        memTemplate.addListProperty('ItemSubscription')
        memTemplate.addListProperty('AssetSubscription')
        memTemplate.addListProperty('SuperAssetSubscription')
        memTemplate.addListProperty('DigitalMediaSubscription')

        memTemplate = schema.addEntity('CatalogDepartment')
        memTemplate.addIdProperty(is_auto=True)
        memTemplate.addStringProperty('Name')

        memTemplate = schema.addEntity('Users')
        memTemplate.addIdProperty(is_auto=True)
        memTemplate.addStringProperty('Name')
        memTemplate.addStringProperty('Department')
        memTemplate.addStringProperty('Email')
        memTemplate.addBoolProperty('IsActive')

        #######################################################################################

        asset_template = schema.addEntity('CatalogClassType')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addStringProperty('ClassType')
        # asset_template.addIntProperty('Code')

        asset_template = schema.addEntity('CatalogItemType')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addStringProperty('ItemType')
        # asset_template.addIntProperty('Code')

        asset_template = schema.addEntity('CatalogComplexType')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addStringProperty('ComplexType')
        # asset_template.addIntProperty('Code')

        asset_template = schema.addEntity('CatalogStatusType')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addStringProperty('StatusType')
        # asset_template.addIntProperty('Code')

        asset_template = schema.addEntity('CatalogStatusType')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addStringProperty('StatusType')
        # asset_template.addIntProperty('Code')

        asset_template = schema.addEntity('CatalogFormatType')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addListProperty('SRC')
        asset_template.addListProperty('PRO')
        asset_template.addListProperty('ENV')
        asset_template.addListProperty('CHR')
        asset_template.addListProperty('RIG')
        asset_template.addListProperty('FXS')
        asset_template.addListProperty('TEM')
        asset_template.addListProperty('GEO')
        asset_template.addListProperty('ART')
        asset_template.addListProperty('SHD')
        asset_template.addListProperty('TEX')
        asset_template.addListProperty('CCH')
        asset_template.addListProperty('SQI')
        asset_template.addListProperty('DCC')
        asset_template.addListProperty('NON')

        daoGenerator = DaoGenerator()
        daoGenerator.generateAll(schema, self.PROJECT_DIR + '/test/model', '192.168.0.189:20017')
开发者ID:HuevoCartoonStudio,项目名称:mongoGenerator,代码行数:89,代码来源:main_testMongoGen_generator.py

示例7: generate_entities

# 需要导入模块: from schema import Schema [as 别名]
# 或者: from schema.Schema import addEntity [as 别名]
    def generate_entities(self):
        schema = Schema('testMongoGen')

        asset_template = schema.addEntity('CatalogItemType')
        asset_template.addIdProperty(is_auto = False)
        asset_template.addStringProperty('ItemType')
        # asset_template.addIntProperty('Code')

        asset_template = schema.addEntity('CatalogComplexType')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addStringProperty('ComplexType')
        # asset_template.addIntProperty('Code')

        asset_template = schema.addEntity('CatalogStatusType')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addStringProperty('StatusType')
        # asset_template.addIntProperty('Code')

        asset_template = schema.addEntity('CatalogStatusType')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addStringProperty('StatusType')
        # asset_template.addIntProperty('Code')

        asset_template = schema.addEntity('CatalogFormatType')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addListProperty('SRC')
        asset_template.addListProperty('PRO')
        asset_template.addListProperty('ENV')
        asset_template.addListProperty('CHR')
        asset_template.addListProperty('RIG')
        asset_template.addListProperty('FXS')
        asset_template.addListProperty('TEM')
        asset_template.addListProperty('GEO')
        asset_template.addListProperty('ART')
        asset_template.addListProperty('SHD')
        asset_template.addListProperty('TEX')
        asset_template.addListProperty('CCH')
        asset_template.addListProperty('SQI')
        asset_template.addListProperty('DCC')
        asset_template.addListProperty('NON')

        asset_template = schema.addEntity('Items')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addStringProperty('Name')
        asset_template.addStringProperty('Path')
        asset_template.addStringProperty('DateTime')
        asset_template.addStringProperty('AssetSubscription')
        asset_template.addStringProperty('ReferenceSubscription')
        asset_template.addStringProperty('TaskSubscription')
        asset_template.addStringProperty('UserSubscription')
        asset_template.addStringProperty('Type')
        asset_template.addStringProperty('Format')
        asset_template.addStringProperty('Status')
        asset_template.addFloatProperty('Version')
        asset_template.addBoolProperty('Archive')
        asset_template.addStringProperty('Complejidad')

        asset_template = schema.addEntity('Assets')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addStringProperty('Name')
        asset_template.addStringProperty('Path')
        asset_template.addStringProperty('DateTime')
        asset_template.addStringProperty('ItemSubscription')
        asset_template.addStringProperty('SuperAssetSubscription')
        asset_template.addStringProperty('ShotSubscription')
        asset_template.addStringProperty('SequenceSubscription')
        asset_template.addStringProperty('TaskSubscription')
        asset_template.addStringProperty('UserSubscription')
        asset_template.addStringProperty('Type')
        asset_template.addStringProperty('Format')
        asset_template.addStringProperty('Status')
        asset_template.addFloatProperty('Version')
        asset_template.addBoolProperty('Archive')
        asset_template.addStringProperty('Complejidad')

        asset_template = schema.addEntity('SuperAssets')
        asset_template.addIdProperty(is_auto=False)
        asset_template.addStringProperty('Name')
        asset_template.addStringProperty('Path')
        asset_template.addStringProperty('DateTime')
        asset_template.addStringProperty('AssetSubscription')
        asset_template.addStringProperty('ShotSubscription')
        asset_template.addStringProperty('SequenceSubscription')
        asset_template.addStringProperty('ProyectSubscription')
        asset_template.addStringProperty('TaskSubscription')
        asset_template.addStringProperty('UserSubscription')
        asset_template.addStringProperty('Type')
        asset_template.addStringProperty('Format')
        asset_template.addStringProperty('Status')
        asset_template.addFloatProperty('Version')
        asset_template.addBoolProperty('Archive')
        asset_template.addStringProperty('Complejidad')

        daoGenerator = DaoGenerator()
        daoGenerator.generateAll(schema, self.PROJECT_DIR + '/documents', '192.168.0.189:20017')
开发者ID:HuevoCartoonStudio,项目名称:mongoGenerator,代码行数:97,代码来源:main_catalogs_generator.py


注:本文中的schema.Schema.addEntity方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。