You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.7 KiB
TypeScript

import { BaseEntity, Column, Entity, Index, JoinColumn, OneToMany, OneToOne } from 'typeorm';
import { createHmac } from 'crypto';
import { Base } from './common';
import { ApiProperty } from '@nestjs/swagger';
// 访客
@Entity({ name: 'node-visitor' })
export class NodeVisitorEntity extends Base {
@ApiProperty({ description: "申请人" })
@Column({ length: 150, nullable: true, type: 'char' })
public applicant: string;
@ApiProperty({ description: "申请人部门" })
@Column({ length: 150, nullable: true, type: 'char' })
public applicant_department: string;
@ApiProperty({ description: "申请日期" })
@Column({ nullable: true, type: 'date' })
public apply_date: string;
@ApiProperty({ description: "申请单号" })
@Column({ length: 150, nullable: true, type: 'char' })
public code: string;
// TODO 确定访客类型
@ApiProperty({ description: "来访类型" })
@Column({ length: 150, nullable: true, type: 'char' })
public visitor_type: string;
@ApiProperty({ description: "来访区域" })
@Column({ length: 150, nullable: true, type: 'char' })
public area: string;
@ApiProperty({ description: "来访单位" })
@Column({ length: 150, nullable: true, type: 'char' })
public visitor_unit: string;
@ApiProperty({ description: "访客人数" })
@Column({ length: 150, nullable: true, type: 'char' })
public visitor_number: string;
@ApiProperty({ description: "交通方式" })
@Column({ length: 150, nullable: true, type: 'char' })
public transport: string;
@ApiProperty({ description: "车牌号" })
@Column({ length: 150, nullable: true, type: 'char' })
public plate_no: string;
@ApiProperty({ description: "起始日期" })
@Column({ nullable: true, type: 'date' })
public start_date: string;
@ApiProperty({ description: "截止日期" })
@Column({ nullable: true, type: 'date' })
public end_date: string;
@ApiProperty({ description: "被访人" })
@Column({ length: 150, nullable: true, type: 'char' })
public visited_staff: string;
@ApiProperty({ description: "被访部门" })
@Column({ length: 150, nullable: true, type: 'char' })
public visited_deparment: string;
@ApiProperty({ description: "被访部门" })
@Column({ length: 150, nullable: true, type: 'char' })
public purpose: string;
@ApiProperty({ description: "携带的电子产品" })
@Column({ length: 255, nullable: true, type: 'char' })
public electronics: string;
// @ApiProperty({ description: "访客清单", type: [VisitorList] })
// @IsArray()
// @IsNotEmpty()
// public visitor_list: VisitorList[];
@ApiProperty({ description: "访客是否有可能接触受控设备" })
@Column({ nullable: true })
public may_access_sensitive_info: boolean;
}