18 lines
355 B
TypeScript
18 lines
355 B
TypeScript
|
|
import { ApiProperty } from '@midwayjs/swagger';
|
|
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
|
|
|
|
@Entity('area')
|
|
export class Area {
|
|
@PrimaryGeneratedColumn()
|
|
id: number;
|
|
|
|
@ApiProperty({ description: '名称' })
|
|
@Column()
|
|
name: string;
|
|
|
|
@ApiProperty({ description: '编码' })
|
|
@Column({ unique: true })
|
|
code: string;
|
|
}
|