What is Atom

Atom is the most basic element of CabloyJS, such as article, announcement, leave application, etc.

Why to called Atom

In chemical reactions, atoms are the most basic particles. In CabloyJS, any desired solutions such as CMS, OA, CRM, ERP, etc., can be realized through the combination of atoms

Benifits of Atom

It is precisely because a general concept of Atom has been abstracted from various business models, that CabloyJS realizes many common features and functions for Atom, thus enabling various practical business conveniently

Unified Storage

The basic information of all atoms are stored in the data table aAtom, and the business related fields are stored in the business table, such as testParty. aAtom and business table are one-to-one relationships

This storage mechanism embodies the unity of commonness and difference, and has the following advantages:

  1. Unified configuration of data permission
  2. Unified operations of CRUD
  3. Unified operations of Star and Label
  4. Unified operation of Search
  5. Unified supporting of Draft
  6. Unified supporting of Simple Workflow

Core Fields of aAtom

Name Type Default Description
id int auto-increment this field is referenced in other tables by the name of atomId generally
createdAt timestamp CURRENT_TIMESTAMP Atom Created Time
updatedAt timestamp CURRENT_TIMESTAMP Atom Updated time
deleted int 0 soft deletion
iid int 0 instance id
itemId int 0 corresponding business table’s item id
atomEnabled int 0 Atom’s state: 0:Draft, 1:Normal
atomFlag int 0 Atom’s Flag, related to atom custom actions
atomClassId int 0 AtomClass’s id
atomName varchar NULL atom’s name
userIdCreated int 0 userId who create this atom
userIdUpdated int 0 userId who update this atom
allowComment int 1 allow comments or not
starCount int 0 amount of stars
commentCount int 0 amount of comments
attachmentCount int 0 amount of attachments
readCount int 0 amount of views

Atom Class

AtomClass is the metadata information corresponding to Atom, which is also set in meta of the module


const meta = {
  base: {
    atoms: {
      party: {
        info: {
          title: 'Party',
          tableName: 'testPartyView',
Name Description
title AtomClass’s title
tableName The name of the data table or view

Star & Label

You can set star mark for atoms, or add different labels to facilitate the rapid classification, sorting and viewing of atoms