BaseEntity

You can extend your entities with this class to add some common fields.

Usage

import { BaseEntity } from '@juicyllama/core'

@Entity()
export class Example extends BaseEntity {
    @Column()
    name: string

    constructor(partial: Partial<Example>) {
        super()
        Object.assign(this, partial)
    }
}

Fields

The following fields are available on all entities that extend this class.

FieldTypeDescription
created_atDateThe date the entity was created
updated_atDateThe date the entity was last updated
deleted_atDateThe date the entity was deleted

Docs v.0.14.0 Copyright © 2024