变量命名

规则

  • 小驼峰命名
  • 不能有拼写错误
  • 尽量接近业务逻辑并根据实际的原理命名

例子

  • name
  • title
  • description
  • status
  • memberCount
  • is/was{Xxx}, can/will{Xxx}, has{Xxx} // bool类型命名,前缀动词需要具有方向性。
  • isLocked (√) / lockFlag(×)
  • xxxStatus
  • xxxId (使用orm建立关系表 应指定别名)

results matching ""

    No results matching ""