Files
suixinkan_ios_new/suixinkan/Features/CooperationOrder/Services/CooperationOrderFeature.swift

38 lines
1.0 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// CooperationOrderFeature.swift
// suixinkan
//
// Created by Codex on 2026/6/29.
//
import Foundation
/// URI 访
enum CooperationOrderFeature {
static let uri = "cooperation_order"
///
static func canAccess(permissionContext: PermissionContext) -> Bool {
permissionContext.canAccess(uri)
}
}
/// Android
enum CooperationOrderRemarkName {
///
static let maxLength = 20
///
static func trimmed(_ remark: String) -> String {
remark.trimmingCharacters(in: .whitespacesAndNewlines)
}
///
static func validationMessage(for remark: String) -> String? {
guard trimmed(remark).count <= maxLength else {
return "备注名不能超过\(maxLength)个字符"
}
return nil
}
}