[英]Plural naming convention for composite objects
The question is about the correct way to name variable or identifiers that groups collections of two or more "things".问题是关于命名变量或标识符的正确方法,这些变量或标识符将两个或多个“事物”分组 collections。 Let me explain a little further with example and question...
让我用例子和问题进一步解释......
I'm not an english native speaker.我不是以英语为母语的人。
In your example you'd name it "appointmentIds", as it's multiple Ids for your appointment type ie Ids for many different appointments.在您的示例中,您将其命名为“appointmentIds”,因为它是您的约会类型的多个 ID,即许多不同约会的 ID。
"appointmentsIds" would imply the relationship between an appointment and its Ids ie the appointment (singular) has many different Ids, which from your example is not likely! “appointmentsIds”将暗示约会与其 ID 之间的关系,即约会(单数)有许多不同的 ID,这在您的示例中是不可能的! I'd suggest reading up on nouns and the possesive (I appreciate English is not your first language, English is hard!)
我建议阅读名词和所有格(我很感激英语不是你的母语,英语很难!)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.