79 lines
2.6 KiB
TypeScript
79 lines
2.6 KiB
TypeScript
|
import { ApiHideProperty, ApiProperty } from '@nestjs/swagger';
|
|||
|
import { Column, Entity, JoinTable, ManyToMany, Relation } from 'typeorm';
|
|||
|
import { CommonEntity } from '~/common/entity/common.entity';
|
|||
|
|
|||
|
@Entity({ name: 'vehicle_usage' })
|
|||
|
export class VehicleUsageEntity extends CommonEntity {
|
|||
|
@Column({ type: 'int', comment: '年度' })
|
|||
|
@ApiProperty({ description: '年度' })
|
|||
|
year: number;
|
|||
|
|
|||
|
@Column({ name: 'vehicle_license', type: 'int', comment: '外出使用的车辆名称' })
|
|||
|
@ApiProperty({ description: '外出使用的车辆名称' })
|
|||
|
vehicleLicense: number;
|
|||
|
|
|||
|
@Column({
|
|||
|
name: 'applicant',
|
|||
|
type: 'varchar',
|
|||
|
length: 50,
|
|||
|
comment: '申请人'
|
|||
|
})
|
|||
|
@ApiProperty({ description: '申请人' })
|
|||
|
applicant: string;
|
|||
|
|
|||
|
@Column({
|
|||
|
name: 'driver',
|
|||
|
type: 'varchar',
|
|||
|
length: 50,
|
|||
|
comment: '出行司机'
|
|||
|
})
|
|||
|
@ApiProperty({ description: '出行司机', nullable: true })
|
|||
|
driver: string;
|
|||
|
|
|||
|
@Column({ name: 'current_mileage', type: 'int', comment: '当前车辆里程数(KM)', nullable: true })
|
|||
|
@ApiProperty({ description: '当前车辆里程数(KM)' })
|
|||
|
currentMileage: number;
|
|||
|
|
|||
|
@Column({
|
|||
|
name: 'expected_start_date',
|
|||
|
type: 'date',
|
|||
|
nullable: true,
|
|||
|
comment: '预计出行开始时间'
|
|||
|
})
|
|||
|
@ApiProperty({ description: '预计出行开始时间' })
|
|||
|
expectedStartDate: Date;
|
|||
|
|
|||
|
@Column({ name: 'expected_end_date', type: 'date', nullable: true, comment: '预计出行结束时间' })
|
|||
|
@ApiProperty({ description: '预计出行结束时间' })
|
|||
|
expectedEndDate: Date;
|
|||
|
|
|||
|
@Column({ name: 'purpose', type: 'varchar', length: 255, comment: '使用事由', nullable: true })
|
|||
|
@ApiProperty({ description: '使用事由' })
|
|||
|
purpose: string;
|
|||
|
|
|||
|
@Column({
|
|||
|
name: 'actual_return_time',
|
|||
|
type: 'date',
|
|||
|
nullable: true,
|
|||
|
comment: '实际回司时间'
|
|||
|
})
|
|||
|
@ApiProperty({ description: '实际回司时间' })
|
|||
|
actualReturnTime: Date;
|
|||
|
|
|||
|
@Column({ name: 'return_mileage', type: 'int', comment: '回城车辆里程数(KM)', nullable: true })
|
|||
|
@ApiProperty({ description: '回城车辆里程数(KM)' })
|
|||
|
returnMileage: number;
|
|||
|
|
|||
|
@Column({ name: 'reviewer', type: 'varchar', length: 50, comment: '审核人', nullable: true })
|
|||
|
@ApiProperty({ description: '审核人' })
|
|||
|
reviewer: string;
|
|||
|
|
|||
|
@Column({ name: 'status', type: 'tinyint', default: 0, comment: '审核状态' })
|
|||
|
@ApiProperty({ description: '审核状态:0待审核,1同意,2.不同意' })
|
|||
|
status: number;
|
|||
|
|
|||
|
@Column({ name: 'remarks', type: 'varchar', length: 255, comment: '备注', nullable: true })
|
|||
|
@ApiProperty({ description: '备注' })
|
|||
|
remarks: string;
|
|||
|
}
|