import { BaseEntity } from "@edr/api-common";
import { Column, Entity } from "typeorm";

@Entity({ name: "customers" })
export class Customer extends BaseEntity {
  @Column({ name: "name", type: "varchar", length: 256 })
  name!: string;

  @Column({ name: "email", type: "varchar", length: 256, unique: true })
  email!: string;

  @Column({ name: "phone", type: "varchar", length: 32 })
  phone!: string;

  @Column({ name: "address", type: "text", nullable: true })
  address?: string | null;

  @Column({ name: "tax_id", type: "varchar", length: 64, nullable: true })
  taxId?: string | null;
}
