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.

76 lines
2.1 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: '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<String>,
// #[sea_orm(column_type = "DateTime", indexed)]
// #[component(value_type = String)]
// pub created_date: DateTime<Utc>,
// #[sea_orm(column_type = "DateTime")]
// #[component(value_type = String)]
// pub updated_date: DateTime<Utc>,
}