npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@quick-qui/model-defines

v2.9.6

Published

basic model defines

Downloads

6

Readme

quick-qui/model-defines

  1. 模型定义的机制和实现。
  2. 模型中涉及的公用基本概念和实现。
  3. 模型描述中的常用语义。
  4. 几种基本的、内置的模型定义。

概念说明

模型的定义机制 -

  1. 模型的定义 - 确定模型相关的规则。包括其职责、内容、描述形式、各部分关系、与其他部分的关系和运算等规则。
  2. 模型的描述 - 根据模型的定义对具体模型进行的编写。
    1. 模型的定义,和模型的描述,两个概念容易混淆。举例说明,UML的类图规则是一个定义,某张具体的类图是一个描述。

模型的公用概念 -

  1. 模型空间 - 模型的整体范围,在同一个空间中的模型可以相互访问, 相互影响。一般作为一个系统对应的全部模型的范围。
  2. 模型的合并(merge) - 将多个模型部分放入到同一个空间中,使它们产生(可能的)相互联系。默认情况下,在同一个repository中出现的模型将被视为同一个空间中。
  3. 模型的继承(extend) - 模型单位间的一个运算,称为继承。比如a extend b,模型单位a将加入b中的内容。a和b都将继续存在。
  4. 模型的注入(inject) - 模型单位间的一个运算,称为注入。比如a inject b, 模型单位a被注入到b中,则模型单位a不会最终存在,其内容被加入到b中。

模型描述的常用语义 -

对模型描述的常用片段做一个约定,希望在各类模型中保持一致。

  1. name
  2. Annotation
  3. Parameters
  4. Ref 引用, 一般形式是 protocol:path

基本的内置的模型定义 -

预先定义好的,认为会比较常用的一些模型定义。

  1. 实体模型 - 定义系统中的业务实体。
  2. 功能模型 - 定义业务的功能。
  3. 表现模型 - 定义业务和功能的呈现形式。
  4. 信息模型 - 定义系统内的信息。
  5. 实现模型 - 定义系统实现的方式。