@postxl/generator 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -151,7 +151,9 @@ function generateFieldDataBoolean({}) {
|
|
|
151
151
|
return faker_1.faker.datatype.boolean().toString();
|
|
152
152
|
}
|
|
153
153
|
function generateFieldDataDate({ field, model, index }) {
|
|
154
|
-
|
|
154
|
+
const d = faker_1.faker.date.past(3);
|
|
155
|
+
d.setHours(0, 0, 0, 0);
|
|
156
|
+
return `new Date('${d.toISOString()}')`;
|
|
155
157
|
}
|
|
156
158
|
function generateFieldDataRelation({ field, model, index, itemCount, }) {
|
|
157
159
|
const referenceId = faker_1.faker.datatype.number({ min: 1, max: itemCount });
|