fix(plugin-workflow-test): fix date fields precision (#5983)

This commit is contained in:
Junyi 2025-01-02 20:33:30 +08:00 committed by GitHub
parent ed39072aaf
commit b1b1dc6f13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 46 additions and 0 deletions

View File

@ -20,5 +20,13 @@ export default {
type: 'hasMany',
name: 'posts',
},
{
type: 'date',
name: 'createdAt',
},
{
type: 'date',
name: 'updatedAt',
},
],
} as CollectionOptions;

View File

@ -11,6 +11,8 @@ import { CollectionOptions } from '@nocobase/database';
export default {
name: 'comments',
createdBy: true,
updatedBy: true,
fields: [
{
type: 'belongsTo',
@ -29,5 +31,13 @@ export default {
type: 'hasMany',
name: 'replies',
},
{
type: 'date',
name: 'createdAt',
},
{
type: 'date',
name: 'updatedAt',
},
],
} as CollectionOptions;

View File

@ -45,5 +45,13 @@ export default {
name: 'read',
defaultValue: 0,
},
{
type: 'date',
name: 'createdAt',
},
{
type: 'date',
name: 'updatedAt',
},
],
} as CollectionOptions;

View File

@ -9,10 +9,20 @@
export default {
name: 'replies',
createdBy: true,
updatedBy: true,
fields: [
{
type: 'string',
name: 'content',
},
{
type: 'date',
name: 'createdAt',
},
{
type: 'date',
name: 'updatedAt',
},
],
};

View File

@ -11,6 +11,8 @@ import { CollectionOptions } from '@nocobase/database';
export default {
name: 'tags',
createdBy: true,
updatedBy: true,
fields: [
{
type: 'belongsToMany',
@ -20,5 +22,13 @@ export default {
type: 'string',
name: 'name',
},
{
type: 'date',
name: 'createdAt',
},
{
type: 'date',
name: 'updatedAt',
},
],
} as CollectionOptions;