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.
		
		
		
		
			
				
					27 lines
				
				874 B
			
		
		
			
		
	
	
					27 lines
				
				874 B
			| 
								 
											1 year ago
										 
									 | 
							
								from pydantic import BaseModel, ConfigDict, Field
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								from pydantic.alias_generators import to_camel
							 | 
						||
| 
								 
											1 year ago
										 
									 | 
							
								from typing import Any, Optional
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class CrudResponseModel(BaseModel):
							 | 
						||
| 
								 | 
							
								    """
							 | 
						||
| 
								 | 
							
								    操作响应模型
							 | 
						||
| 
								 | 
							
								    """
							 | 
						||
| 
								 
											1 year ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											1 year ago
										 
									 | 
							
								    is_success: bool = Field(description='操作是否成功')
							 | 
						||
| 
								 | 
							
								    message: str = Field(description='响应信息')
							 | 
						||
| 
								 | 
							
								    result: Optional[Any] = Field(default=None, description='响应结果')
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								class UploadResponseModel(BaseModel):
							 | 
						||
| 
								 | 
							
								    """
							 | 
						||
| 
								 | 
							
								    上传响应模型
							 | 
						||
| 
								 | 
							
								    """
							 | 
						||
| 
								 
											1 year ago
										 
									 | 
							
								
							 | 
						||
| 
								 
											2 years ago
										 
									 | 
							
								    model_config = ConfigDict(alias_generator=to_camel)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 
											1 year ago
										 
									 | 
							
								    file_name: Optional[str] = Field(default=None, description='新文件映射路径')
							 | 
						||
| 
								 | 
							
								    new_file_name: Optional[str] = Field(default=None, description='新文件名称')
							 | 
						||
| 
								 | 
							
								    original_filename: Optional[str] = Field(default=None, description='原文件名称')
							 | 
						||
| 
								 | 
							
								    url: Optional[str] = Field(default=None, description='新文件url')
							 |