node2sql-cli
Version:
Node project tools
27 lines (23 loc) • 597 B
text/typescript
import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
import { Length, IsEmail } from "class-validator";
export class User {
id: number;
name: string;
email: string;
}
export const userSchema = {
id: { type: "number", required: true, example: 1 },
name: { type: "string", required: true, example: "Javier" },
email: { type: "string", required: true, example: "test@gmail.com" }
};