wangzhibo
4 天以前 c19f1f7e21c93d1f13b4f44a8a615f65af577559
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';
 
/**
 * 商品信息
 */
@Entity('goods_comment')
export class GoodsCommentEntity extends BaseEntity {
  @Index()
  @Column({ comment: '用户ID' })
  userId: number;
 
  @Index()
  @Column({ comment: '商品ID' })
  goodsId: number;
 
  @Index()
  @Column({ comment: '订单ID' })
  orderId: number;
 
  @Column({ comment: '内容' })
  content: string;
 
  @Column({ comment: '星数', default: 5 })
  starCount: number;
 
  @Column({ comment: '图片', type: 'json', nullable: true })
  pics: string[];
}