Cloud Development Database

Cloud development provides a JSON database, and as the name suggests, each record in the database is a JSON-formatted object. A database can have multiple collections (equivalent to tables in relational data). The collection can be viewed as a JSON array. Each object in the array is a record in the format of a JSON object.

The mapping between relational database and JSON database is shown in the following table:

Main table ER diagram

Alumni Information Sheet

UserModel.DB_STRUCTURE = { _pid: 'string|true', USER_ID: 'string|true', USER_NAME: 'string | true | comment = user name', USER_PIC: 'string | true | comment = the avatars', USER_PIC_CLOUD_ID: 'string | | false comment = users' avatars cloud storage address, USER_PHONE_CHECKED:' string | true | comment = already check phone number ', USER_MINI_QRCODE: 'object | | false comment = small program code address {url, cloudId}', USER_MINI_OPENID: 'string | true | openid' comment = a small program, USER_MINI_ORI_OPENID: 'string | true | comment = small original openid' program, USER_UNIONID: 'string | | false comment = WeChat unionid' open platform, USER_WX_OPENID: 'string | | false comment = public openid' number, USER_IS_SUBSCRIBE: 'int | true | default = 0 | comment = # public concern for 0/1', USER_SUBSCRIBE_TIME: 'int | true | default = 0 | comment = # public attention time', USER_IS_MASK: 'int | true | default = 0 | comment whether ma3 jia3 = 0/1', USER_STATUS: 'int | true | | default = 1 comment = state 0 = approval, normal, 1 = = 8 VIP (# # # 1-8 of normal range), 9 = disable, 10 = deleted', USER_IS_SUPP: 'int | true | | default = 1 comment = 0/1 for additional information, USER_INVITE_ID:' string | | false comment = 'invitation code, USER_TYPE: 'int | true | default = 0 | comment = user type 0 = study, 1 = teachers', USER_CHECK_PIC: 'array | | false default = [] | comment = audit image object array [] {cloudId, url}', USER_SEX: 'int | true | | default = 1 comment = 1 = male gender, 2 = female', USER_BIRTH: 'string | true | = birth' comment, USER_NATIVE: 'string | | false comment = native', USER_OPEN_SET: 'int | true | | default = 1 comment = contact data form 1 = all users, 8 = authentication users and exchanging business CARDS, 3 = friends, 9 = have exchanged CARDS users', USER_WHOLE: 'int | true | default = 0 | = data integrity' comment, USER_IS_CARD: 'int | true | | default = 1 if the comment = 0/1' accepting calling card, USER_IS_CARD_MSG: 'int | true | | default = 1 comment = 0/1' alerted to whether to accept the exchange, USER_MOBILE: 'string | | false comment = contact phone number', USER_WECHAT: 'string | false | = WeChat' comment, USER_QQ: 'string | false | = QQ' comment, USER_EMAIL: 'string' | false, USER_ITEM: 'string | true | = class' comment, USER_ENROLL: 'int | true | default = 0 | comment =' year in, USER_GRAD: 'string | true | default = 0 | = graduation year' comment, USER_EDU: 'string | true | comment = academic high school, vocational, college, undergraduate, master's, Dr, postdoctoral, other', USER_ITEM2: 'string | | false comment = 2' class, USER_ENROLL2: 'int | | false default = 0 | comment = 2' year in, USER_GRAD2: 'string | | false default = 0 | comment = 2 years' graduation, USER_EDU2:' string | | false comment = 2 middle school education, higher vocational and junior college, bachelor, master, PhD, postdoctoral, other ', USER_ITEM3: 'string | | false comment = 3' class, USER_ENROLL3: 'int | | false default = 0 | comment = 3 year in', USER_GRAD3: 'string | | false default = 0 | comment = year 3' graduation, USER_EDU3: 'string | | false comment = 3 middle school of record of formal schooling, higher vocational colleges, colleges, undergraduate, master's, PhD, postdoctoral, other', USER_COMPANY: 'string | | false comment = current unit', USER_COMPANY_DEF: 'string | | false comment = current unit nature reserve, authority departments, institutions, state-owned enterprises, the world top 500, foreign companies, listed companies, private enterprises, has its own enterprise, individual business, freelance, other', USER_COMPANY_DESC: 'string | | false comment = company/unit introduced', USER_COMPANY_DUTY: 'string | | false comment = current position', USER_TRADE: ' 'string | | false comment = the current industry, USER_TRADE_EX:' string | | false comment = 'current industry added, USER_CITY: 'string | | false comment = the current city', USER_WORK_STATUS: 'string | | false comment = keep working status, full-time, part-time, students, unemployed, retired, boss, freelancer, housewives, other', USER_DESC: 'string | | false comment =' introduce yourself, USER_RESOURCE: 'string | | false comment = can provide resources', USER_NEED:' string | | false comment = 'demand, USER_SUPP: 'string | | false registered added comment =', USER_FAV_CNT: 'int | true | default = 0 | comment = by' collection number, USER_INVITE_CNT: 'int | true | default = 0 | comment = number of invitation', USER_VIEW_CNT: 'int | true | default = 0 | comment = be viewed times', USER_ALBUM_CNT: 'int | true | default = 0 | comment = send photo album number', USER_INFO_CNT: 'int | true | default = 0 | comment = number of mutual' hair, USER_MEET_CNT: 'int | true | default = 0 | comment = number of launch', USER_MEET_JOIN_CNT: 'int | true | default = 0 | comment = enrollment number', USER_MEET_CHECK_IN_CNT: 'int | true | default = 0 | comment = activity sign-in number', USER_WX_GENDER: 'int | true | default = 0 | comment = 0 = undefined WeChat sex, 1 = male, female 2 =', USER_WX_AVATAR_URL: 'string | | false comment = WeChat picture links', USER_WX_NICKNAME: 'string | false | = WeChat nickname' comment, USER_WX_LANGUAGE: 'string | | false comment = WeChat language', USER_WX_CITY: 'string | | false = WeChat cities' comment, USER_WX_PROVINCE:' string | | false comment = WeChat provinces', USER_WX_COUNTRY: 'string | | false = WeChat countries' comment, USER_WX_UPDATE_TIME:' int | | false comment = WeChat information update time ', USER_ACTIVE: 'array | | false comment = user dynamic', USER_LOGIN_CNT: 'int | true | default = 0 | comment = number of landing', USER_LOGIN_TIME: 'int | | false comment =' login time recently, USER_ADD_TIME: 'int | true', USER_ADD_IP: 'string' | false, USER_EDIT_TIME: 'int|true', USER_EDIT_IP: 'string|false', }

Table of background operation logs

LogModel.DB_STRUCTURE = { _pid: 'string|true', LOG_ID: 'string|true', LOG_CONTENT: 'string|true', LOG_ADMIN_ID: 'string | true | administrators' comment = alumni information platform, LOG_TYPE:' int | true | = log type 'comment, LOG_ADD_TIME:' int | true ', LOG_EDIT_TIME: 'int|true', LOG_ADD_IP: 'string|false', LOG_EDIT_IP: 'string|false', };

Alumni Name Card List

CardModel.DB_STRUCTURE = { _pid: 'string|true', CARD_ID: 'string|true', CARD_MY_ID: 'string|true', CARD_YOUR_ID: 'string | true | = owners' comment, CARD_MSG:' string | | false comment = 'message, CARD_STATUS: 'int | true | default = 0 | state comment = 0 = = by' 1 = refused to 9, CARD_ADD_TIME: 'int | true', CARD_EDIT_TIME: 'int | true', CARD_ADD_IP: 'string|false', CARD_EDIT_IP: 'string|false', };

System setting table

SetupModel.DB_STRUCTURE = { _pid: 'string|true', SETUP_ID: 'string|true', SETUP_TITLE: 'string | | false comment = site name', SETUP_ABOUT: 'string | | false comment = about us', SETUP_SKIN: 'the string | true | default = skin1 | = skin' comment, SETUP_MARK: 'object | | false default = {} | comment = crest object {cloudId, url}', SETUP_LOGO: 'object | | false default = {} | comment = homepage object {cloudId, url}' reproduction, SETUP_LOGO_USER: 'object | | false default = {} | comment = website user details object {cloudId, url}' reproduction, SETUP_LOGO_MY: 'object | | false default = {} | comment = site personal center object {cloudId, url}' reproduction, SETUP_MINI_QRCODE: 'object | | false default = {} | comment = school applet code object {cloudId, url}', SETUP_AD_PIC: 'array | | false default = [] | comment = poster reproduction object array [cloud1 cloud2, cloud3]', SETUP_REG_CHECK: 'int | true | default = 0 | comment = 0/1' registration whether audit, SETUP_REG_CHECK_DESC: 'string | | false comment = registration audit instructions', SETUP_REG_CHECK_PIC: 'int | true | default = 0 | comment = 0/1' registration whether audit, SETUP_REG_CHECK_PIC_DESC: 'string | | false comment = registration audit instructions', SETUP_ALBUM_CHECK: 'int | true | default = 0 | comment whether album review = 0/1', SETUP_MEET_CHECK: 'int | true | default = 0 | comment = activities whether audit 0/1', SETUP_INFO_CHECK: 'int | true | default = 0 | comment = 0/1' mutual whether audit, SETUP_ALBUM_COMMENT: 'int | true | | default = 1 comment = 0/1 album whether to allow comments', SETUP_MEET_COMMENT: 'int | true | | default = 1 comment = activities whether to allow comments on 0/1', SETUP_INFO_COMMENT: 'int | true | | default = 1 comment = 0/1' mutual whether to allow comments, SETUP_NEWS_COMMENT: 'int | true | | default = 1 comment = 0/1 information whether to allow comments', SETUP_REG_WORK:' int | true | default = 0 | comment = 0/1 registration whether to allow the staff ', SETUP_ADD_TIME: 'int|true', SETUP_EDIT_TIME: 'int|true', SETUP_ADD_IP: 'string|false', SETUP_EDIT_IP: 'string|false', };

Project code GIT: https://github.com/ccliqi/CC-…