UNPKG

typescript-express-starter

Version:
14 lines (10 loc) 359 B
import { Model, ModelObject } from 'objection'; import { User } from '@interfaces/users.interface'; export class UserModel extends Model implements User { id!: number; email!: string; password!: string; static tableName = 'users'; // database table name static idColumn = 'id'; // id column name } export type UserShape = ModelObject<UserModel>;