mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-30 14:00:16 +00:00
22 lines
491 B
TypeScript
22 lines
491 B
TypeScript
import { EntityModel } from '@midwayjs/orm';
|
|
import { BaseEntity } from 'midwayjs-cool-core';
|
|
import { Column } from 'typeorm';
|
|
|
|
/**
|
|
* 商品
|
|
*/
|
|
@EntityModel('demo_app_goods')
|
|
export class DemoAppGoodsEntity extends BaseEntity {
|
|
@Column({ comment: '标题' })
|
|
title: string;
|
|
|
|
@Column({ comment: '图片' })
|
|
pic: string;
|
|
|
|
@Column({ comment: '价格', type: 'decimal', precision: 5, scale: 2 })
|
|
price: number;
|
|
|
|
@Column({ comment: '分类', type: 'tinyint' })
|
|
type: number;
|
|
}
|