Database design

tbl_tenant tenant table

Record all the tenant information.

Field

Type

Main key

Description

tenantid

string

key

Master Key

username

string

-

The user name at the time of registration requires uniqueness.[5-29] between characters

password

string

-

when registering, the password needs to satisfy the password complexity requirement, satisfying the combination of the number/letter/special character at least two or more, [6-18] characters.Password in database is stored after using PBKDF2 plus salt value

company

string

-

User Company Name

telephonenumber

string

-

the mobile phone number of the user is used for verifying the user identity when the password is recovered, and the 11-bit effective number must be satisfied

mailaddress

string

-

User email address, which is used to verify the user identity when the password is recovered and must be in a valid mailbox format

gender

string

-

User Gender

isallowed

boolean

-

Is the account allowed to be registered

createtime

timestamp

-

Creation time (i.e. registration time)

modifytime

timestamp

-

Modify Time

pweffecttime

timestamp

-

密码生效时间

Initial value:

               tenantid               |    username    |                                     password                                     | company | telephonenumber | mailaddress | gender | isallowed | createtime | modifytime | pweffecttime
--------------------------------------+----------------+----------------------------------------------------------------------------------+---------+-----------------+--------+-----------
 de3565b1-a7c2-42b9-b281-3f032af29ff7 | guest          | 59756fda85ebddee6024d5cc0e6edcde3226693257a9c1eb662c56426b8a4f232b3d56c321adbd91 | company | 13800000000     | 13800000000@edgegallery.org | 1      | t | 初始数据入库时间(now函数值) | 初始数据入库时间(now函数值) | NULL
 39937079-99fe-4cd8-881f-04ca8c4fe09d | admin          | 472645ad1af0101adaa6769cc865fec3b29fedeba6dc912900a59b1364b7a6bb17bb9a0575854547 | company | 13800000001     | 13800000001@edgegallery.org | 1      | t | 初始数据入库时间(now函数值) | 初始数据入库时间(now函数值) | 初始数据入库时间(now函数值)往前推10年的时间

The default password for the guest account is:guest
The default password for the admin account is:Admin@321
对于admin用户,首次登录后会强制修改默认密码。
对于非guest用户,密码超过90天后过期,登录时会强制修改密码。

tbl_role user role table

configuration supported platform and user role, the table initializes at startup and does not support dynamic addition

field

type

Master Key

describe

id

string

key

Master Key

platform

string

-

Platform supported

role

string

-

Role definition supported

Initial value:

 id | platform  |  role
----+-----------+--------
  1 | APPSTORE  | GUEST
  2 | APPSTORE  | TENANT
  3 | APPSTORE  | ADMIN
  4 | DEVELOPER | GUEST
  5 | DEVELOPER | TENANT
  6 | DEVELOPER | ADMIN
  7 | MECM      | GUEST
  8 | MECM      | TENANT
  9 | MECM      | ADMIN
  10 | ATP      | GUEST
  11 | ATP      | TENANT
  12 | ATP      | ADMIN
  13 | LAB      | GUEST
  14 | LAB      | TENANT
  15 | LAB      | ADMIN

Description:

  • APPSTORE: Application of warehouse platform

  • DEVELOPER: Application development integration platform

  • MECM:MEC management platform

  • ATP: application authentication test platform

  • LAB: Laboratory Management Platform

tbl_tenant_role relationship table

Relationship to describe tenants and roles

field

type

Master Key

describe

tenantid

string

Tenant ID

roleid

string

Role Id

Initial value:

               tenantid               | roleid 
--------------------------------------+--------
 de3565b1-a7c2-42b9-b281-3f032af29ff7 |      1
 de3565b1-a7c2-42b9-b281-3f032af29ff7 |      4
 de3565b1-a7c2-42b9-b281-3f032af29ff7 |      7
 de3565b1-a7c2-42b9-b281-3f032af29ff7 |     10
 de3565b1-a7c2-42b9-b281-3f032af29ff7 |     13
 39937079-99fe-4cd8-881f-04ca8c4fe09d |      3
 39937079-99fe-4cd8-881f-04ca8c4fe09d |      6
 39937079-99fe-4cd8-881f-04ca8c4fe09d |      9
 39937079-99fe-4cd8-881f-04ca8c4fe09d |     12
 39937079-99fe-4cd8-881f-04ca8c4fe09d |     15

Contrast with the initialization data of tbl_tenant,
de3565b1-a7c2-42b9-b281-3f032af29ff7It is a guest user and has the GUEST role of each platform by default;
39937079-99fe-4cd8-881f-04ca8c4fe09dIt is an admin user and has the ADMIN role of each platform by default;