Skip to content

Auto-inherit id, createdAt, and updatedAt fields in collections #44

@AliiiBenn

Description

@AliiiBenn

Description

Collections should automatically inherit common fields without needing to define them explicitly.

Requirements

All collections should automatically have these fields:

  • id - Auto-incrementing integer or UUID
  • createdAt - Timestamp when the record was created
  • updatedAt - Timestamp when the record was last updated

Example Usage

const users = collection({
  slug: 'users',
  fields: {
    name: field({ fieldType: f.text() })
    // Automatically inherits: id, createdAt, updatedAt
  }
})

These fields should be:

  • Automatically added to every collection
  • Managed by the system (not user-editable)
  • Available in queries and mutations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions