如何命名我的枚举元素?

发布于 2024-09-26 02:33:18 字数 517 浏览 1 评论 0原文

我在命名应用程序数据模型中的元素时遇到问题。

在应用程序中,用户可以创建自己的元模型。他通过创建实体类型来实现这一点,类型定义实体具有哪些属性。但是,存在三种实体类型:

  1. 始终只有一个该类型的实例。
    例如,我想为我工作的公司建模。它有名称、股价和员工人数。这些价值观随着时间的推移而变化,但始终只有一家公司。
  2. 该类型有不同的实例,每个实例都是唯一的。
    例如:城市。一个城市有一个名字和人口数量,有不同的城市,每个城市只存在一次。
  3. 该类型的每个实例定义多个实体。
    示例:汽车。汽车有颜色和制造商。但红色奔驰并不只有一辆。尽管它们很相似,但红色梅赛德斯#1 与红色梅赛德斯#2 不同。

假设您是该工具的用户,并且您了解这三种风格的概念。您想要创建新的实体类型,系统会提示您在选项 1、2 和 3 之间进行选择。您将如何命名这些选项?

编辑:
用户可以使用文档和帮助。此外,用户应该具有技术/编程背景,因此理解这三个概念应该没有问题。

I have a problem naming the elements in my application's data model.

In the application, the user has the possibility to create his own metamodel. He does so by creating entity types and a type defines which properties an entity has. However, there are three kinds of entity types:

  1. There is always exactly one instance of the type.
    For instance, I want to model the company I am working for. It has a name, a share price and a number of employees. These values change over time, but there is always exactly one company.
  2. There are different instances of the type, each is unique.
    Example: Cities. A city has a name and a population count, there are different cities and each city exists exactly once.
  3. Each instance of the type defines multiple entities.
    Example: Cars. A car has a color and a manufacturer. But there is not only one red mercedes. And even though they are similar, red mercedes #1 is different from red mercedes #2.

So lets say you are a user of this tool and you understood the concept of these three flavors. You want to create a new entity type and are prompted to choose between option 1, 2 and 3. How would you name these options?

Edit:
Documentation and help is available to the user. Also the user can be expecteted to have a technical/programming background, so understanding these three concepts should be no problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无敌元气妹 2024-10-03 02:33:18

首先让我确保我理解这个问题,
这就是你所拥有的(如果我错了,请纠正我):

#of实例,是唯一的

(1,true)
(n,真)
(n,false)

如果是这样,
对于#of 实例,我将使用单\复数
对于 is\are unique(\not unique),我会使用 unique \ununique。

所以你会得到:

singleUnique
复数唯一
pluralUnunique

这是我能想到的最好的。我不知道您的用户是谁以及环境是什么,但是如果您可以选择添加应该使用的提示(或文档)。

First of all let me make sure I understand the problem,
Here's what you have (correct me if I'm wrong):

#of instances , is/are Unique

(1,true)
(n,true)
(n,false)

If so,
for #of instances I would use single \ plural
for is\are unique (\ not unique) I would use unique \ ununique.

so you'll get:

singleUnique
pluralUnique
pluralUnunique

That's the best I could think of.. I don't know exactly who are your users and what is the environment, But if you have an option of adding tips (or documentation) that should be used for sure.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文