// src/users/entities/user.entity.ts
import { ApiProperty } from '@nestjs/swagger';
import { user } from '@prisma/client';
import { Exclude } from 'class-transformer';

export class UserEntity implements user {
	constructor(partial: Partial<UserEntity>) {
		Object.assign(this, partial);
	}

	@ApiProperty()
	id: number;

	@ApiProperty()
	createdAt: Date;

	@ApiProperty()
	updatedAt: Date;

	@ApiProperty()
	name: string;

	@ApiProperty()
	email: string;

	@ApiProperty()
	role: string;

	@Exclude()
	password: string;

	@ApiProperty()
	clientId: number | null;

	@ApiProperty()
	contactDetailsId: number | null;

	@ApiProperty()
	active: boolean;

	@ApiProperty()
	uuid: string;

	@ApiProperty()
	favourite: boolean;

	@ApiProperty()
	phone: string;

	@ApiProperty()
	address1: string;

	@ApiProperty()
	address2: string;

	@ApiProperty()
	city: string;

	@ApiProperty()
	state: string;

	@ApiProperty()
	postcode: string;

	@ApiProperty()
	country: string;
}
