You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							97 lines
						
					
					
						
							3.5 KiB
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							97 lines
						
					
					
						
							3.5 KiB
						
					
					
				| from typing import Union, Optional, List | |
| from pydantic import BaseModel, ConfigDict, Field | |
| from module_admin.annotation.pydantic_annotation import as_query | |
| from pydantic.alias_generators import to_camel | |
| 
 | |
| 
 | |
| class MetaprocessconfigModel(BaseModel): | |
|     """ | |
|     参数配置表对应pydantic模型 | |
|     """ | |
|     model_config = ConfigDict(alias_generator=to_camel, from_attributes=True) | |
|     pdc_id: Optional[int] = Field(default=None, description='流程定义主键') | |
|     db_type: Optional[str] = Field(default=None,  description='数据库类型') | |
|     ac_target: Optional[str] = Field(default=None, max_length=5, description='采集对象(0 字表 1过程)') | |
|     taskDefinitionJson: Optional[str] = Field(default=None, description='节点数据') | |
|     taskRelationJson: Optional[str] = Field(default=None,  max_length=2000, description='节点位置') | |
|     locations: Optional[str] = Field(default=None, description='更新者') | |
|     name: Optional[str] = Field(default=None,  description='流程定义名') | |
|     tenantCode: Optional[str] = Field(default=None,  description='租户代码') | |
|     executionType: Optional[str] = Field(default=None,  description='执行类型') | |
|     description: Optional[str] = Field(default=None,  description='描述') | |
|     globalParams: Optional[str] = Field(default=None,  description='全局参数') | |
|     timeout: Optional[str] = Field(default=None,  description='超时设置') | |
|     releaseState: Optional[str] = Field(default=None,  description='发布状态') | |
| 
 | |
|     class Metaprocessconfig: | |
|         orm_mode = False | |
| 
 | |
|     | |
| 
 | |
| class MetaprocessconfigQueryModel(MetaprocessconfigModel): | |
|     """ | |
|     元数据任务不分页查询模型 | |
|     """ | |
|     begin_time: Optional[str]= Field(default=None, description='开始时间') | |
|     end_time: Optional[str]= Field(default=None, description='结束时间') | |
| 
 | |
| @as_query | |
| class MetaprocessconfigPageObject(MetaprocessconfigQueryModel): | |
|     """ | |
|     元数据任务分页查询模型 | |
|     """ | |
|     page_num: int = Field(default=1, description='当前页码') | |
|     page_size: int = Field(default=10, description='每页记录数') | |
| 
 | |
| 
 | |
| class MetaprocessconfigPageObjectResponse(BaseModel): | |
|     """ | |
|     元数据任务列表分页查询返回模型 | |
|     """ | |
|     rows: List[Union[MetaprocessconfigModel, None]] = [] | |
|     page_num: int | |
|     page_size: int | |
|     total: int | |
|     has_next: bool | |
| 
 | |
| 
 | |
| class DeleteMetaprocessconfigModel(BaseModel): | |
|     """ | |
|     删除参数配置模型 | |
|     """ | |
|     metaprocessconfig_ids: str | |
| 
 | |
| class OperaMetaprocessconfigModel(BaseModel): | |
|     """ | |
|     上下线模型 | |
|     """ | |
|     id: str | |
|     type:str | |
| 
 | |
| class CrudMetaprocessconfigResponse(BaseModel): | |
|     """ | |
|     操作参数配置响应模型 | |
|     """ | |
|     is_success: bool | |
|     message: str | |
| def to_dict(self): | |
|         return { | |
|             "metatask_id": self.metatask_id, | |
|             "metatask_name": self.metatask_name, | |
|             "metatask_type": self.metatask_type, | |
|             "create_by": self.create_by, | |
|             "create_time": self.create_time.isoformat() if self.create_time else None, | |
|             "update_by": self.update_by, | |
|             "update_time": self.update_time.isoformat() if self.update_time else None, | |
|             "remark": self.remark, | |
|             "status": self.status, | |
|             "ds_time": self.ds_time.isoformat() if self.ds_time else None, | |
|             "dbRName": self.dbRName, | |
|             "dbRCode": self.dbRCode, | |
|             "dbName": self.dbName, | |
|             "dbCode": self.dbCode, | |
|             "dbSName": self.dbSName, | |
|             "dbSCode": self.dbSCode, | |
|             "acquisitionType": self.acquisitionType, | |
|             "ac_target": self.ac_target | |
|         } |