|
@@ -1,6 +1,7 @@
|
|
|
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';
|
|
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne, JoinColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';
|
|
|
import { ActivityEntity } from '@/server/modules/activities/activity.entity';
|
|
import { ActivityEntity } from '@/server/modules/activities/activity.entity';
|
|
|
import { DeleteStatus, DisabledStatus } from '@/share/types';
|
|
import { DeleteStatus, DisabledStatus } from '@/share/types';
|
|
|
|
|
+import { VehicleType } from './route.schema';
|
|
|
|
|
|
|
|
@Entity({ name: 'routes' })
|
|
@Entity({ name: 'routes' })
|
|
|
export class RouteEntity {
|
|
export class RouteEntity {
|
|
@@ -28,8 +29,8 @@ export class RouteEntity {
|
|
|
@Column({ name: 'departure_time', type: 'timestamp', comment: '出发时间' })
|
|
@Column({ name: 'departure_time', type: 'timestamp', comment: '出发时间' })
|
|
|
departureTime!: Date;
|
|
departureTime!: Date;
|
|
|
|
|
|
|
|
- @Column({ name: 'vehicle_type', type: 'varchar', length: 50, comment: '车型' })
|
|
|
|
|
- vehicleType!: string;
|
|
|
|
|
|
|
+ @Column({ name: 'vehicle_type', type: 'enum', enum: VehicleType, comment: '车型' })
|
|
|
|
|
+ vehicleType!: VehicleType;
|
|
|
|
|
|
|
|
@Column({ name: 'price', type: 'decimal', precision: 10, scale: 2, comment: '价格' })
|
|
@Column({ name: 'price', type: 'decimal', precision: 10, scale: 2, comment: '价格' })
|
|
|
price!: number;
|
|
price!: number;
|