import { Entity, Column } from "typeorm";
import { AbstractEntity } from "./AbstractEntity.js";

@Entity({ name: "user" })
export class UserEntity extends AbstractEntity {
  @Column({ nullable: false })
  userName!: string;

  @Column({ nullable: false })
  email!: string;

  @Column({ nullable: false })
  password!: string;

  @Column({ nullable: true })
  firstName?: string;

  @Column({ nullable: true })
  lastName?: string;

  @Column({ default: "user" })
  role!: string;
}
