You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.1 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

namespace Admin.NET.Plugin.HwPortal;
/// <summary>
/// 门户模块常量定义。
/// <para>
/// 【C# 语法知识点 - static class 静态类】
/// public static class HwPortalConstants
///
/// 静态类有以下特点:
/// 1. 不能实例化(不能 new
/// 2. 所有成员必须是静态的
/// 3. 是密封的(不能被继承)
///
/// 对比 Java
/// Java 没有静态类概念,通常用 final class + private 构造函数模拟:
/// public final class HwPortalConstants {
/// private HwPortalConstants() {} // 防止实例化
/// public static final String PRODUCT_INFO_CONFIG_MODAL = "...";
/// }
///
/// C# 的 static class 更简洁,编译器自动阻止实例化和继承。
/// </para>
/// <para>
/// 【命名约定】
/// C# 常量命名约定:
/// - PascalCase首字母大写
/// - 有意义的名称
/// - 避免缩写
///
/// Java 常量命名约定:
/// - UPPER_SNAKE_CASE全大写下划线分隔
///
/// 这是两种语言的文化差异,功能上完全等价。
/// </para>
/// </summary>
public static class HwPortalConstants
{
/// <summary>
/// 产品信息配置模式 1。
/// 原 Java 常量PRODUCT_INFO_CONFIG_MODAL_ONE。
/// </summary>
public const string ProductInfoConfigModalOne = "1";
/// <summary>
/// 产品信息配置模式 2。
/// 原 Java 常量PRODUCT_INFO_CONFIG_MODAL_TWO。
/// </summary>
public const string ProductInfoConfigModalTwo = "2";
/// <summary>
/// hw 官网当前额外使用的树形配置模式。
/// 该值在原业务代码里被直接写死为 13这里收口为常量便于复用。
/// </summary>
public const string ProductInfoConfigModalTree = "13";
/// <summary>
/// 首页典型案例标记。
/// </summary>
public const string HomeTypicalFlagYes = "1";
/// <summary>
/// 典型案例标记。
/// </summary>
public const string TypicalFlagYes = "1";
/// <summary>
/// 门户配置类型“2”。
/// 当前业务里用于切换另一套查询 SQL。
/// </summary>
public const string PortalConfigTypeTwo = "2";
}