UNPKG

@wearesage/schema

Version:

A flexible schema definition and validation system for TypeScript with multi-database support

19 lines (14 loc) 269 B
import { Entity, Property, Id } from '../core/decorators'; @Entity() export class Post { @Id() id: string; @Property({ required: true }) title: string; @Property() content: string; @Property() published: boolean; @Property() authorId: string; }