``fix inconsistent quotes in code and update schema with additional fields and rules
``
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { faker } from "@faker-js/faker";
|
||||
import { faker } from '@faker-js/faker';
|
||||
|
||||
const getId = (id) => id.padStart(15, "0");
|
||||
const getId = (id) => id.padStart(15, '0');
|
||||
|
||||
const row_array = Array.from({ length: 10 }, (_, i) => [
|
||||
getId(String(i + 1)),
|
||||
faker.person.firstName(),
|
||||
"",
|
||||
'',
|
||||
faker.internet.email(),
|
||||
faker.phone.number(),
|
||||
faker.company.name(),
|
||||
@@ -19,13 +19,11 @@ const row_array = Array.from({ length: 10 }, (_, i) => [
|
||||
},
|
||||
Math.floor(Math.random() * (100 - 0 + 1)) + 0,
|
||||
faker.location.timeZone(),
|
||||
["en", "de", "es", "fr", "ja", "ko", "zh-CN"].sort(
|
||||
() => Math.random() - 0.5
|
||||
)[0],
|
||||
['en', 'de', 'es', 'fr', 'ja', 'ko', 'zh-CN'].sort(() => Math.random() - 0.5)[0],
|
||||
faker.finance.currencyCode(),
|
||||
]);
|
||||
|
||||
import fs from "fs";
|
||||
const filePath = "output.json";
|
||||
import fs from 'fs';
|
||||
const filePath = 'output.json';
|
||||
fs.writeFileSync(filePath, JSON.stringify(row_array, null, 2));
|
||||
console.log(`Wrote ${row_array.length} records to ${filePath}`);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Generated at: 2025-05-12T06:02:53.613Z
|
||||
// Generated at: 2025-05-13T05:24:33.962Z
|
||||
|
||||
|
||||
//
|
||||
@@ -206,9 +206,9 @@ Table QuizLPCategories {
|
||||
cat_image file
|
||||
pos integer
|
||||
init_answer text
|
||||
visible text
|
||||
created datetime
|
||||
updated datetime
|
||||
visible text
|
||||
slug text
|
||||
remarks text
|
||||
description text
|
||||
@@ -223,8 +223,6 @@ Table QuizLPQuestions {
|
||||
word text
|
||||
sound file
|
||||
cat_id integer [ref: > QuizLPCategories.id] // relation3870140739
|
||||
created datetime
|
||||
updated datetime
|
||||
cat_name text
|
||||
cat_image file
|
||||
pos integer
|
||||
@@ -233,6 +231,8 @@ Table QuizLPQuestions {
|
||||
slug text
|
||||
remarks text
|
||||
description text
|
||||
created datetime
|
||||
updated datetime
|
||||
}
|
||||
|
||||
//
|
||||
@@ -258,9 +258,9 @@ Table QuizMFCategories {
|
||||
cat_image file
|
||||
pos integer
|
||||
init_answer text
|
||||
visible text
|
||||
created datetime
|
||||
updated datetime
|
||||
visible text
|
||||
}
|
||||
|
||||
//
|
||||
@@ -341,17 +341,23 @@ Table Teachers {
|
||||
// collection type: base
|
||||
Table UserMetas {
|
||||
id text [pk, not null]
|
||||
helloworld text
|
||||
address text
|
||||
meta text
|
||||
user_id integer [ref: > users.id] // relation2809058197
|
||||
state text
|
||||
created datetime
|
||||
updated datetime
|
||||
status text
|
||||
avatar file
|
||||
role text
|
||||
name text
|
||||
email text
|
||||
phone text
|
||||
company text
|
||||
taxId text
|
||||
timezone text
|
||||
language text
|
||||
currency text
|
||||
billingAddress integer [ref: > billingAddress.id] // relation2115670734
|
||||
}
|
||||
|
||||
//
|
||||
|
@@ -1750,6 +1750,20 @@
|
||||
"system": false,
|
||||
"type": "json"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text2058414169",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "visible",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"hidden": false,
|
||||
"id": "autodate2990389176",
|
||||
@@ -1770,20 +1784,6 @@
|
||||
"system": false,
|
||||
"type": "autodate"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text2058414169",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "visible",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
@@ -1892,26 +1892,6 @@
|
||||
"system": false,
|
||||
"type": "relation"
|
||||
},
|
||||
{
|
||||
"hidden": false,
|
||||
"id": "autodate2990389176",
|
||||
"name": "created",
|
||||
"onCreate": true,
|
||||
"onUpdate": false,
|
||||
"presentable": false,
|
||||
"system": false,
|
||||
"type": "autodate"
|
||||
},
|
||||
{
|
||||
"hidden": false,
|
||||
"id": "autodate3332085495",
|
||||
"name": "updated",
|
||||
"onCreate": true,
|
||||
"onUpdate": true,
|
||||
"presentable": false,
|
||||
"system": false,
|
||||
"type": "autodate"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
@@ -2014,6 +1994,26 @@
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "editor"
|
||||
},
|
||||
{
|
||||
"hidden": false,
|
||||
"id": "autodate2990389176",
|
||||
"name": "created",
|
||||
"onCreate": true,
|
||||
"onUpdate": false,
|
||||
"presentable": false,
|
||||
"system": false,
|
||||
"type": "autodate"
|
||||
},
|
||||
{
|
||||
"hidden": false,
|
||||
"id": "autodate3332085495",
|
||||
"name": "updated",
|
||||
"onCreate": true,
|
||||
"onUpdate": true,
|
||||
"presentable": false,
|
||||
"system": false,
|
||||
"type": "autodate"
|
||||
}
|
||||
],
|
||||
"indexes": [],
|
||||
@@ -2182,6 +2182,20 @@
|
||||
"system": false,
|
||||
"type": "json"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text2058414169",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "visible",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"hidden": false,
|
||||
"id": "autodate2990389176",
|
||||
@@ -2201,20 +2215,6 @@
|
||||
"presentable": false,
|
||||
"system": false,
|
||||
"type": "autodate"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text2058414169",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "visible",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"indexes": [],
|
||||
@@ -2870,7 +2870,7 @@
|
||||
"id": "text4192936109",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "helloworld",
|
||||
"name": "address",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
@@ -2901,6 +2901,20 @@
|
||||
"system": false,
|
||||
"type": "relation"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text2744374011",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "state",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"hidden": false,
|
||||
"id": "autodate2990389176",
|
||||
@@ -2921,20 +2935,6 @@
|
||||
"system": false,
|
||||
"type": "autodate"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text2744374011",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "status",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"hidden": false,
|
||||
"id": "file376926767",
|
||||
@@ -3001,6 +3001,89 @@
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text1337919823",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "company",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text2020362641",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "taxId",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text922858135",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "timezone",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text3571151285",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "language",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"autogeneratePattern": "",
|
||||
"hidden": false,
|
||||
"id": "text1767278655",
|
||||
"max": 0,
|
||||
"min": 0,
|
||||
"name": "currency",
|
||||
"pattern": "",
|
||||
"presentable": false,
|
||||
"primaryKey": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"cascadeDelete": false,
|
||||
"collectionId": "pbc_1509025625",
|
||||
"hidden": false,
|
||||
"id": "relation2115670734",
|
||||
"maxSelect": 999,
|
||||
"minSelect": 0,
|
||||
"name": "billingAddress",
|
||||
"presentable": false,
|
||||
"required": false,
|
||||
"system": false,
|
||||
"type": "relation"
|
||||
}
|
||||
],
|
||||
"indexes": [],
|
||||
@@ -3604,11 +3687,11 @@
|
||||
},
|
||||
{
|
||||
"id": "pbc_1509025625",
|
||||
"listRule": null,
|
||||
"viewRule": null,
|
||||
"createRule": null,
|
||||
"updateRule": null,
|
||||
"deleteRule": null,
|
||||
"listRule": "",
|
||||
"viewRule": "",
|
||||
"createRule": "",
|
||||
"updateRule": "",
|
||||
"deleteRule": "",
|
||||
"name": "billingAddress",
|
||||
"type": "base",
|
||||
"fields": [
|
||||
@@ -3798,11 +3881,11 @@
|
||||
},
|
||||
{
|
||||
"id": "pbc_2109205374",
|
||||
"listRule": null,
|
||||
"viewRule": null,
|
||||
"createRule": null,
|
||||
"updateRule": null,
|
||||
"deleteRule": null,
|
||||
"listRule": "",
|
||||
"viewRule": "",
|
||||
"createRule": "",
|
||||
"updateRule": "",
|
||||
"deleteRule": "",
|
||||
"name": "t1",
|
||||
"type": "base",
|
||||
"fields": [
|
||||
|
Reference in New Issue
Block a user