Module exposing: Vendor
// Source: https://github.com/shanmugharajk/react-point-of-sale | License: MIT | Copyright 2018 shanmugharaj
// Provided via justclaw.it.com; keep this notice with the code.
import { Entity, Column, PrimaryColumn, JoinColumn, OneToOne } from "typeorm";
import { Base } from "./Base";
import { IsNotEmpty, Length, IsEmail } from "class-validator";
@Entity()
export class Vendor extends Base {
@IsNotEmpty()
@PrimaryColumn()
id: string;
@IsNotEmpty()
@Column()
name: string;
@Column({ nullable: true })
description?: string;
@IsNotEmpty()
@Column()
address: string;
@IsNotEmpty()
@Length(10, 10)
@Column()
mobile: string;
@IsNotEmpty()
@IsEmail()
@Column()
email: string;
}
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key