494 lines
20 KiB
Dart
494 lines
20 KiB
Dart
/// 文件上传类型枚举
|
||
///
|
||
/// 该枚举定义了系统中所有支持的文件上传类型,包含类型标识符和对应的存储路径
|
||
/// 使用示例:
|
||
/// ```dart
|
||
/// // 通过类型获取枚举
|
||
/// UploadFileType? fileType = UploadFileType.fromType('102');
|
||
///
|
||
/// // 通过路径获取枚举
|
||
/// UploadFileType? fileType = UploadFileType.fromPath('hidden_danger_video');
|
||
///
|
||
/// // 直接使用枚举值
|
||
/// String type = UploadFileType.userAvatar.type; // '13'
|
||
/// String path = UploadFileType.userAvatar.path; // 'user_avatar'
|
||
/// ```
|
||
enum UploadFileType {
|
||
/// 隐患照片 - 类型: '3', 路径: 'hidden_danger_photo'
|
||
hiddenDangerPhoto('3', 'hidden_danger_photo'),
|
||
|
||
/// 隐患整改照片 - 类型: '4', 路径: 'hidden_danger_rectification_photo'
|
||
hiddenDangerRectificationPhoto('4', 'hidden_danger_rectification_photo'),
|
||
|
||
/// 隐患验收照片 - 类型: '5', 路径: 'hidden_danger_verification_photo'
|
||
hiddenDangerVerificationPhoto('5', 'hidden_danger_verification_photo'),
|
||
|
||
/// 证书照片 - 类型: '6', 路径: 'certificate_photo'
|
||
certificatePhoto('6', 'certificate_photo'),
|
||
|
||
/// 受限空间平面图 - 类型: '7', 路径: 'confined_space_plan'
|
||
confinedSpacePlan('7', 'confined_space_plan'),
|
||
|
||
/// 隐患整改方案图 - 类型: '8', 路径: 'hidden_danger_rectification_plan'
|
||
hiddenDangerRectificationPlan('8', 'hidden_danger_rectification_plan'),
|
||
|
||
/// 有限空间确认人签字 - 类型: '9', 路径: 'confined_space_confirmation_signature'
|
||
confinedSpaceConfirmationSignature(
|
||
'9',
|
||
'confined_space_confirmation_signature',
|
||
),
|
||
|
||
/// 劳动合同图片 - 类型: '10', 路径: 'labor_contract_image'
|
||
laborContractImage('10', 'labor_contract_image'),
|
||
|
||
/// 商业保险图片 - 类型: '11', 路径: 'commercial_insurance_image'
|
||
commercialInsuranceImage('11', 'commercial_insurance_image'),
|
||
|
||
/// 证书信息 - 类型: '12', 路径: 'certificate_information'
|
||
certificateInformation('12', 'certificate_information'),
|
||
|
||
/// 用户头像 - 类型: '13', 路径: 'user_avatar'
|
||
userAvatar('13', 'user_avatar'),
|
||
|
||
/// 身份证照片 - 类型: '14', 路径: 'id_card_photo'
|
||
idCardPhoto('14', 'id_card_photo'),
|
||
|
||
/// 社保卡照片 - 类型: '15', 路径: 'social_security_card_photo'
|
||
socialSecurityCardPhoto('15', 'social_security_card_photo'),
|
||
|
||
/// 工伤保险凭证 - 类型: '16', 路径: 'work_related_injury_insurance_certificate'
|
||
workRelatedInjuryInsuranceCertificate(
|
||
'16',
|
||
'work_related_injury_insurance_certificate',
|
||
),
|
||
|
||
/// 特种设备巡检照片 - 类型: '17', 路径: 'special_equipment_inspection_photo'
|
||
specialEquipmentInspectionPhoto('17', 'special_equipment_inspection_photo'),
|
||
|
||
/// 人员证书 - 类型: '18', 路径: 'personnel_certificate'
|
||
personnelCertificate('18', 'personnel_certificate'),
|
||
|
||
/// 三级教育培训 - 类型: '19', 路径: 'three_level_safety_education_training'
|
||
threeLevelSafetyEducationTraining(
|
||
'19',
|
||
'three_level_safety_education_training',
|
||
),
|
||
|
||
/// 重大危险源报警处置前照片 - 类型: '20', 路径: 'major_hazard_source_alarm_before_handling_photo'
|
||
majorHazardSourceAlarmBeforeHandlingPhoto(
|
||
'20',
|
||
'major_hazard_source_alarm_before_handling_photo',
|
||
),
|
||
|
||
/// 重大危险源报警处置后照片 - 类型: '21', 路径: 'major_hazard_source_alarm_after_handling_photo'
|
||
majorHazardSourceAlarmAfterHandlingPhoto(
|
||
'21',
|
||
'major_hazard_source_alarm_after_handling_photo',
|
||
),
|
||
|
||
/// 智能门禁外来车辆驾驶证照片 - 类型: '22', 路径: 'smart_access_control_external_vehicle_driver_license_photo'
|
||
smartAccessControlExternalVehicleDriverLicensePhoto(
|
||
'22',
|
||
'smart_access_control_external_vehicle_driver_license_photo',
|
||
),
|
||
|
||
/// 智能门禁外来车辆行驶证照片 - 类型: '23', 路径: 'smart_access_control_external_vehicle_registration_photo'
|
||
smartAccessControlExternalVehicleRegistrationPhoto(
|
||
'23',
|
||
'smart_access_control_external_vehicle_registration_photo',
|
||
),
|
||
|
||
/// 安全环保检查终验图片 - 类型: '50', 路径: 'safety_and_environmental_inspection_final_acceptance_image'
|
||
safetyAndEnvironmentalInspectionFinalAcceptanceImage(
|
||
'50',
|
||
'safety_and_environmental_inspection_final_acceptance_image',
|
||
),
|
||
|
||
/// 隐患延期临时措施附件 - 类型: '101', 路径: 'hidden_danger_extension_temporary_measures_attachment'
|
||
hiddenDangerExtensionTemporaryMeasuresAttachment(
|
||
'101',
|
||
'hidden_danger_extension_temporary_measures_attachment',
|
||
),
|
||
|
||
/// 隐患视频 - 类型: '102', 路径: 'hidden_danger_video'
|
||
hiddenDangerVideo('102', 'hidden_danger_video'),
|
||
|
||
/// 盲板位置图 - 类型: '105', 路径: 'blind_plate_position_map'
|
||
blindPlatePositionMap('105', 'blind_plate_position_map'),
|
||
|
||
/// 临时处置信息 - 类型: '106', 路径: 'temporary_disposal_information'
|
||
temporaryDisposalInformation('106', 'temporary_disposal_information'),
|
||
|
||
/// 整改建议及方案 - 类型: '107', 路径: 'rectification_suggestions_and_plan'
|
||
rectificationSuggestionsAndPlan('107', 'rectification_suggestions_and_plan'),
|
||
|
||
/// 重大隐患上传隐患调查报告 - 类型: '108', 路径: 'major_hidden_danger_investigation_report'
|
||
majorHiddenDangerInvestigationReport(
|
||
'108',
|
||
'major_hidden_danger_investigation_report',
|
||
),
|
||
|
||
/// 重大隐患安委会或党委会决议记录 - 类型: '109', 路径: 'major_hidden_danger_safety_committee_or_party_committee_resolution_record'
|
||
majorHiddenDangerSafetyCommitteeOrPartyCommitteeResolutionRecord(
|
||
'109',
|
||
'major_hidden_danger_safety_committee_or_party_committee_resolution_record',
|
||
),
|
||
|
||
/// 较大隐患整改-临时处置措施 - 类型: '110', 路径: 'significant_hidden_danger_rectification_temporary_disposal_measures'
|
||
significantHiddenDangerRectificationTemporaryDisposalMeasures(
|
||
'110',
|
||
'significant_hidden_danger_rectification_temporary_disposal_measures',
|
||
),
|
||
|
||
/// 较大隐患整改-隐患整改过程记录 - 类型: '111', 路径: 'significant_hidden_danger_rectification_hidden_danger_rectification_process_record'
|
||
significantHiddenDangerRectificationHiddenDangerRectificationProcessRecord(
|
||
'111',
|
||
'significant_hidden_danger_rectification_hidden_danger_rectification_process_record',
|
||
),
|
||
|
||
/// 补充重大隐患信息 - 类型: '112', 路径: 'supplement_major_hidden_danger_information'
|
||
supplementMajorHiddenDangerInformation(
|
||
'112',
|
||
'supplement_major_hidden_danger_information',
|
||
),
|
||
|
||
/// 安委会办公室会议记录 - 类型: '113', 路径: 'safety_committee_office_meeting_record'
|
||
safetyCommitteeOfficeMeetingRecord(
|
||
'113',
|
||
'safety_committee_office_meeting_record',
|
||
),
|
||
|
||
/// 报警图片 - 类型: '114', 路径: 'alarm_photo'
|
||
alarmPhoto('114', 'alarm_photo'),
|
||
|
||
/// 消防器材类型合格表中照片 - 类型: '115', 路径: 'fire_equipment_type_qualification_photo'
|
||
fireEquipmentTypeQualificationPhoto(
|
||
'115',
|
||
'fire_equipment_type_qualification_photo',
|
||
),
|
||
|
||
/// 动火人图片 - 类型: '116', 路径: 'hot_work_personnel_photo'
|
||
hotWorkPersonnelPhoto('116', 'hot_work_personnel_photo'),
|
||
|
||
/// 安全承诺书签名 - 类型: '117', 路径: 'safety_pledge_signature'
|
||
safetyPledgeSignature('117', 'safety_pledge_signature'),
|
||
|
||
/// 动火单位负责人确认签字 - 类型: '118', 路径: 'hot_work_unit_responsible_person_confirmation_signature'
|
||
hotWorkUnitResponsiblePersonConfirmationSignature(
|
||
'118',
|
||
'hot_work_unit_responsible_person_confirmation_signature',
|
||
),
|
||
|
||
/// 现场管辖单位负责人签字 - 类型: '119', 路径: 'on_site_jurisdiction_unit_responsible_person_signature'
|
||
onSiteJurisdictionUnitResponsiblePersonSignature(
|
||
'119',
|
||
'on_site_jurisdiction_unit_responsible_person_signature',
|
||
),
|
||
|
||
/// 动火许可证签发单位签字 - 类型: '120', 路径: 'hot_work_permit_issuing_unit_signature'
|
||
hotWorkPermitIssuingUnitSignature(
|
||
'120',
|
||
'hot_work_permit_issuing_unit_signature',
|
||
),
|
||
|
||
/// 动火许可证签字 - 类型: '121', 路径: 'hot_work_permit_signature'
|
||
hotWorkPermitSignature('121', 'hot_work_permit_signature'),
|
||
|
||
/// 动火前管辖单位确认签字 - 类型: '122', 路径: 'pre_hot_work_jurisdiction_unit_confirmation_signature'
|
||
preHotWorkJurisdictionUnitConfirmationSignature(
|
||
'122',
|
||
'pre_hot_work_jurisdiction_unit_confirmation_signature',
|
||
),
|
||
|
||
/// 现场负责人确实签字 - 类型: '123', 路径: 'on_site_responsible_person_confirmation_signature'
|
||
onSiteResponsiblePersonConfirmationSignature(
|
||
'123',
|
||
'on_site_responsible_person_confirmation_signature',
|
||
),
|
||
|
||
/// 动火后现场管辖单位确认 - 类型: '124', 路径: 'post_hot_work_site_jurisdiction_unit_confirmation'
|
||
postHotWorkSiteJurisdictionUnitConfirmation(
|
||
'124',
|
||
'post_hot_work_site_jurisdiction_unit_confirmation',
|
||
),
|
||
|
||
/// 延迟监火图片 - 类型: '125', 路径: 'delayed_fire_monitoring_pictures'
|
||
delayedFireMonitoringPictures('125', 'delayed_fire_monitoring_pictures'),
|
||
|
||
/// 安全环保检查发起签字 - 类型: '126', 路径: 'safety_and_environmental_inspection_initiation_signature'
|
||
safetyAndEnvironmentalInspectionInitiationSignature(
|
||
'126',
|
||
'safety_and_environmental_inspection_initiation_signature',
|
||
),
|
||
|
||
/// 检查人确认签字 - 类型: '127', 路径: 'inspector_confirmation_signature'
|
||
inspectorConfirmationSignature('127', 'inspector_confirmation_signature'),
|
||
|
||
/// 被检查人确认签字 - 类型: '128', 路径: 'inspected_person_confirmation_signature'
|
||
inspectedPersonConfirmationSignature(
|
||
'128',
|
||
'inspected_person_confirmation_signature',
|
||
),
|
||
|
||
/// 安全环保检查申辩签字 - 类型: '129', 路径: 'safety_and_environmental_inspection_appeal_signature'
|
||
// safetyAndEnvironmentalInspectionAppealSignature('129', 'safety_and_environmental_inspection_appeal_signature'),
|
||
|
||
/// (港股安委办主任)安全总监签发 - 类型: '130', 路径: 'hk_safety_committee_office_director_safety_director_issuance'
|
||
hkSafetyCommitteeOfficeDirectorSafetyDirectorIssuance(
|
||
'130',
|
||
'hk_safety_committee_office_director_safety_director_issuance',
|
||
),
|
||
|
||
/// 动火发包单位签字 - 类型: '131', 路径: 'hot_work_contracting_unit_signature'
|
||
hotWorkContractingUnitSignature('131', 'hot_work_contracting_unit_signature'),
|
||
|
||
/// 安全总监审批 - 类型: '132', 路径: 'safety_director_approval'
|
||
safetyDirectorApproval('132', 'safety_director_approval'),
|
||
|
||
/// 分公司安全总监审批 - 类型: '133', 路径: 'branch_safety_director_approval'
|
||
branchSafetyDirectorApproval('133', 'branch_safety_director_approval'),
|
||
|
||
/// 项目主管部门负责人审核 - 类型: '134', 路径: 'project_authority_review_signature'
|
||
projectAuthorityReviewSignature('134', 'project_authority_review_signature'),
|
||
|
||
/// 分公司主要负责人签批 - 类型: '135', 路径: 'branch_manager_approval_signature'
|
||
branchManagerApprovalSignature('135', 'branch_manager_approval_signature'),
|
||
|
||
/// 事故/事件 - 类型: '136', 路径: 'accident_incident'
|
||
accidentIncident1('136', 'accident_incident'),
|
||
|
||
/// 事故/事件 - 类型: '137', 路径: 'accident_incident'
|
||
accidentIncident2('137', 'accident_incident'),
|
||
|
||
/// 隐患处置方案 - 类型: '138', 路径: 'hidden_disposal_plan'
|
||
hiddenDisposalPlan('138', 'hidden_disposal_plan'),
|
||
|
||
/// 安全环保检查-检查签字 - 类型: '139', 路径: 'safety_environmental_inspection_inspection_signature'
|
||
safetyEnvironmentalInspectionInspectionSignature(
|
||
'139',
|
||
'safety_environmental_inspection_inspection_signature',
|
||
),
|
||
|
||
/// 安全环保检查-检查情况 - 类型: '140', 路径: 'safety_environmental_inspection_inspection_situation'
|
||
safetyEnvironmentalInspectionInspectionSituation(
|
||
'140',
|
||
'safety_environmental_inspection_inspection_situation',
|
||
),
|
||
|
||
/// 安全环保检查-检查人签字 - 类型: '141', 路径: 'safety_environmental_inspection_inspector_signature'
|
||
safetyEnvironmentalInspectionInspectorSignature(
|
||
'141',
|
||
'safety_environmental_inspection_inspector_signature',
|
||
),
|
||
|
||
/// 安全环保检查-被检查人签字 - 类型: '142', 路径: 'safety_environmental_inspection_inspected_signature'
|
||
safetyEnvironmentalInspectionInspectedSignature(
|
||
'142',
|
||
'safety_environmental_inspection_inspected_signature',
|
||
),
|
||
|
||
/// 安全环保检查-被检查文件 - 类型: '143', 路径: 'safety_environmental_inspection_inspected_file'
|
||
safetyEnvironmentalInspectionInspectedFile(
|
||
'143',
|
||
'safety_environmental_inspection_inspected_file',
|
||
),
|
||
|
||
/// 安全环保检查-申辩签字 - 类型: '144', 路径: 'safety_environmental_inspection_defense_signature'
|
||
safetyEnvironmentalInspectionDefenseSignature(
|
||
'144',
|
||
'safety_environmental_inspection_defense_signature',
|
||
),
|
||
|
||
/// 清单检查合格 - 类型: '145', 路径: 'qualified_list_inspection'
|
||
qualifiedListInspection('145', 'qualified_list_inspection'),
|
||
|
||
/// 安全环保检查-验收 - 类型: '146', 路径: 'safety_environmental_inspection_acceptance'
|
||
safetyEnvironmentalInspectionAcceptance(
|
||
'146',
|
||
'safety_environmental_inspection_acceptance',
|
||
),
|
||
|
||
/// 隐患清单排查查签字 - 类型: '147', 路径: 'hidden_qualified_listInspection_signature'
|
||
hiddenQualifiedListInspectionSignature(
|
||
'147',
|
||
'hidden_qualified_listInspection_signature',
|
||
),
|
||
|
||
/// 相关方-专项资质 - 类型: '148', 路径: 'special_qualification'
|
||
specialQualification('148', 'special_qualification'),
|
||
|
||
/// 相关方-安全资质(弃用,全部改成使用148) - 类型: '149', 路径: 'safety_qualification'
|
||
safetyQualificationDeprecated('149', 'safety_qualification'),
|
||
|
||
/// 安全承诺签字 - 类型: '150', 路径: 'promise_bookmark_photo'
|
||
promiseBookmarkPhoto('150', 'promise_bookmark_photo'),
|
||
|
||
/// 相关方-项目相关资料 - 类型: '151', 路径: 'project_related_materials'
|
||
projectRelatedMaterials('151', 'project_related_materials'),
|
||
|
||
/// 法律法规库 - 类型: '152', 路径: 'legal_and_regulatory_database'
|
||
legalAndRegulatoryDatabase('152', 'legal_and_regulatory_database'),
|
||
|
||
/// 安全生产操作规程资源库 - 类型: '153', 路径: 'regulations_resource_library'
|
||
regulationsResourceLibrary('153', 'regulations_resource_library'),
|
||
|
||
/// 安全生产责任制资源库 - 类型: '154', 路径: 'responsibility_based_resource_library'
|
||
responsibilityBasedResourceLibrary(
|
||
'154',
|
||
'responsibility_based_resource_library',
|
||
),
|
||
|
||
/// 安全生产管理制度资源库 - 类型: '155', 路径: 'institutional_resource_library'
|
||
institutionalResourceLibrary('155', 'institutional_resource_library'),
|
||
|
||
/// 相关方-安全管理协议 - 类型: '156', 路径: 'security_management_agreement'
|
||
securityManagementAgreement('156', 'security_management_agreement'),
|
||
|
||
/// 监管人员车辆 - 类型: '157', 路径: 'supervision_personnel_vehicle'
|
||
supervisionPersonnelVehicle('157', 'supervision_personnel_vehicle'),
|
||
|
||
/// 监管人员车辆行驶证 - 类型: '158', 路径: 'supervision_personnel_vehicle_license'
|
||
supervisionPersonnelVehicleLicense(
|
||
'158',
|
||
'supervision_personnel_vehicle_license',
|
||
),
|
||
|
||
/// 特种作业人员证件照片 - 类型: '159', 路径: 'special_operation_personnel_photo'
|
||
specialOperationPersonnelPhoto('159', 'special_operation_personnel_photo'),
|
||
|
||
/// 特种设备操作人员证件照片 - 类型: '160', 路径: 'special_equipment_operator_photo'
|
||
specialEquipmentOperatorPhoto('160', 'special_equipment_operator_photo'),
|
||
|
||
/// 主要负责人证件照片 - 类型: '161', 路径: 'main_responsible_person_photo'
|
||
mainResponsiblePersonPhoto('161', 'main_responsible_person_photo'),
|
||
|
||
/// 安全生产管理人员证件照片 - 类型: '162', 路径: 'photos_safety_production_management_personnel'
|
||
photosSafetyProductionManagementPersonnel(
|
||
'162',
|
||
'photos_safety_production_management_personnel',
|
||
),
|
||
|
||
// 教培申请承诺书 - 类型: '163', 路径: 'education_and_training_application'
|
||
educationAndTrainingApplication('163', 'education_and_training_application'),
|
||
|
||
// 课程封面 - 类型: '164', 路径: 'cover_of_education_and_training_courses'
|
||
coverOfEducationAndTrainingCourses(
|
||
'164',
|
||
'cover_of_education_and_training_courses',
|
||
),
|
||
|
||
/// 在线学习签到签字 - 类型: '165', 路径: 'online_learning_sign_signature'
|
||
onlineLearningSignSignature('165', 'online_learning_sign_signature'),
|
||
|
||
/// 在线学习考试签字 - 类型: '166', 路径: 'online_learning_exam_signature'
|
||
onlineLearningExamSignature('166', 'online_learning_exam_signature'),
|
||
|
||
/// 人脸识别图片上传 - 类型: '300', 路径: 'facial_recognition_images'
|
||
facialRecognitionImages('300', 'facial_recognition_images'),
|
||
|
||
/// ai识别图片 - 类型: '301', 路径: 'ai_recognition_images'
|
||
aiRecognitionImages('301', 'ai_recognition_images'),
|
||
|
||
/// 消防点检检查合格 - 类型: '302', 路径: 'fire_safety_inspection_passed_images'
|
||
fireSafetyInspectionPassedImages(
|
||
'302',
|
||
'fire_safety_inspection_passed_images',
|
||
),
|
||
|
||
/// 门口门禁车辆行驶证照片 - 类型: '601', 路径: 'gate_access_vehicle_license_photo'
|
||
gateAccessVehicleLicensePhoto('601', 'gate_access_vehicle_license_photo'),
|
||
|
||
/// 门口门禁车辆车辆照片 - 类型: '602', 路径: 'gate_access_vehicle_photo'
|
||
gateAccessVehiclePhoto('602', 'gate_access_vehicle_photo'),
|
||
|
||
/// 门口门禁车辆附件 - 类型: '603', 路径: 'gate_access_vehicle_attachment'
|
||
gateAccessVehicleAttachment('603', 'gate_access_vehicle_attachment'),
|
||
|
||
/// 排放标准证明 - 类型: '604', 路径: 'emission_standard_certificate'
|
||
emissionStandardCertificate('604', 'emission_standard_certificate'),
|
||
|
||
/// 机动车登记证书(绿本) - 类型: '605', 路径: 'motor_vehicle_registration_certificate_green_book'
|
||
motorVehicleRegistrationCertificateGreenBook(
|
||
'605',
|
||
'motor_vehicle_registration_certificate_green_book',
|
||
);
|
||
|
||
const UploadFileType(this.type, this.path);
|
||
|
||
/// 文件类型标识符(字符串格式)
|
||
final String type;
|
||
|
||
/// 文件存储路径
|
||
final String path;
|
||
|
||
/// 通过类型字符串查找对应的枚举值
|
||
///
|
||
/// 参数:
|
||
/// - [type]: 文件类型字符串,如 '102'
|
||
///
|
||
/// 返回值:
|
||
/// - 对应的 UploadFileType 枚举值,如果未找到则返回 null
|
||
///
|
||
/// 示例:
|
||
/// ```dart
|
||
/// UploadFileType? fileType = UploadFileType.fromType('102');
|
||
/// if (fileType != null) {
|
||
/// print(fileType.path); // 输出: hidden_danger_video
|
||
/// }
|
||
/// ```
|
||
static UploadFileType? fromType(String type) {
|
||
try {
|
||
return values.firstWhere((element) => element.type == type);
|
||
} catch (e) {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/// 通过路径查找对应的枚举值
|
||
///
|
||
/// 参数:
|
||
/// - [path]: 文件存储路径,如 'hidden_danger_video'
|
||
///
|
||
/// 返回值:
|
||
/// - 对应的 UploadFileType 枚举值,如果未找到则返回 null
|
||
///
|
||
/// 示例:
|
||
/// ```dart
|
||
/// UploadFileType? fileType = UploadFileType.fromPath('hidden_danger_video');
|
||
/// if (fileType != null) {
|
||
/// print(fileType.type); // 输出: 102
|
||
/// }
|
||
/// ```
|
||
static UploadFileType? fromPath(String path) {
|
||
try {
|
||
return values.firstWhere((element) => element.path == path);
|
||
} catch (e) {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
/// 获取所有文件类型字符串的列表
|
||
///
|
||
/// 返回值:
|
||
/// - 包含所有文件类型字符串的列表
|
||
///
|
||
/// 示例:
|
||
/// ```dart
|
||
/// List<String> allTypes = UploadFileType.allTypes;
|
||
/// print(allTypes.contains('102')); // 输出: true
|
||
/// ```
|
||
static List<String> get allTypes => values.map((e) => e.type).toList();
|
||
|
||
/// 获取所有文件存储路径的列表
|
||
///
|
||
/// 返回值:
|
||
/// - 包含所有文件存储路径的列表
|
||
///
|
||
/// 示例:
|
||
/// ```dart
|
||
/// List<String> allPaths = UploadFileType.allPaths;
|
||
/// print(allPaths.contains('hidden_danger_video')); // 输出: true
|
||
/// ```
|
||
static List<String> get allPaths => values.map((e) => e.path).toList();
|
||
}
|