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: 'visitor' }) export class VisitorEntity extends Base { @ApiProperty({ description: '真实姓名' }) @Column({ length: 50, nullable: true, type: 'char' }) public true_name: string; @ApiProperty({ description: '手机号' }) @Column({ length: 50 }) public mobile: string; @ApiProperty({ description: '公司' }) @Column({ length: 50 }) public company: string; @ApiProperty({ description: '邀请码' }) @Column({ length: 50 }) public code: string; @ApiProperty({ description: '邀请码' }) @Column({ length: 50 }) public card_code: string; @ApiProperty({ description: '二维码有效时间' }) @Column({ length: 50 }) public qrCode?: string; @ApiProperty({ description: '事由' }) @Column({ length: 50 }) public reason?: string; @ApiProperty({ description: '身份证号' }) @Column({ length: 50 }) public id_number?: string; @ApiProperty({ description: '受访人' }) @Column({ length: 50 }) public interviewee?: string; @ApiProperty({ description: '楼层' }) @Column({ length: 50 }) public floor?: string; @ApiProperty({ description: '开始日期' }) @Column({ type: "date" }) public start_date: string; @ApiProperty({ description: '开始时间' }) @Column({ type: "time" }) public start_time: string; @ApiProperty({ description: '结束日期' }) @Column({ type: "date" }) public end_date: string; @ApiProperty({ description: '结束时间' }) @Column({ type: "time" }) public end_time: string; // #[sea_orm(column_type = "Char(Some(36))", nullable)] // pub create_user_id: Option, // #[sea_orm(column_type = "DateTime", indexed)] // #[component(value_type = String)] // pub created_date: DateTime, // #[sea_orm(column_type = "DateTime")] // #[component(value_type = String)] // pub updated_date: DateTime, }