90 lines
1.6 KiB
Python
90 lines
1.6 KiB
Python
from dataclasses import dataclass, field
|
|
from typing import List, Dict, Optional
|
|
|
|
|
|
@dataclass
|
|
class FileInfo:
|
|
"""使用ファイル一覧 中的一行"""
|
|
no: int
|
|
file_db_name: str
|
|
identifier: str
|
|
dd_name: str
|
|
io: str
|
|
copy_group: str
|
|
format: str
|
|
record_len: int
|
|
medium: str
|
|
remarks: str
|
|
|
|
|
|
@dataclass
|
|
class CopyField:
|
|
"""COPYBOOK 中的单个字段"""
|
|
level: int
|
|
name: str
|
|
raw_name: str
|
|
pic_type: str
|
|
pic_bytes: int
|
|
|
|
|
|
@dataclass
|
|
class KeyInfo:
|
|
"""キー項目一覧 中的一行"""
|
|
no: int
|
|
file_name: str
|
|
sort_condition: str
|
|
key_condition: str
|
|
|
|
|
|
@dataclass
|
|
class ModuleInfo:
|
|
"""使用モジュール一覧 中的一行"""
|
|
no: int
|
|
function: str
|
|
program_id: str
|
|
copy_name: str
|
|
|
|
|
|
@dataclass
|
|
class TableColumn:
|
|
"""DB 表中的单个字段"""
|
|
no: int
|
|
name_jp: str
|
|
name_en: str
|
|
type: str
|
|
max_len: str
|
|
decimal_digits: str
|
|
byte_count: str
|
|
nullable: bool
|
|
is_pk: bool
|
|
|
|
|
|
@dataclass
|
|
class TableInfo:
|
|
"""DB 表定义"""
|
|
table_name: str
|
|
db_id: str
|
|
copy_id: str
|
|
columns: List[TableColumn]
|
|
pk_columns: List[str]
|
|
|
|
|
|
@dataclass
|
|
class ProgramMeta:
|
|
"""程序完整元数据"""
|
|
program_id: str
|
|
program_name: str
|
|
system_name: str
|
|
pgm_type: str
|
|
pgm_pattern: str
|
|
summary_lines: List[str]
|
|
prerequisites: List[Dict[str, str]]
|
|
files: List[FileInfo]
|
|
keys: List[KeyInfo]
|
|
modules: List[ModuleInfo]
|
|
process_detail: str
|
|
output_records: str
|
|
input_type: str
|
|
copy_fields: Dict[str, List[CopyField]]
|
|
db_tables: Dict[str, TableInfo]
|