wangzhibo
6 天以前 3f249e399659dcd09d3fe58071b146e50e45c17f
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
30
31
32
33
34
35
36
37
38
39
40
41
import { BaseEntity } from '@cool-midway/core';
import { Column, Entity } from 'typeorm';
 
/**
 * 优惠券信息
 */
@Entity('market_coupon_info')
export class MarketCouponInfoEntity extends BaseEntity {
  @Column({ comment: '标题' })
  title: string;
 
  @Column({ comment: '描述' })
  description: string;
 
  @Column({ comment: '类型 0-满减', default: 0 })
  type: number;
 
  @Column({ comment: '金额', type: 'decimal', precision: 12, scale: 2 })
  amount: number;
 
  @Column({ comment: '数量' })
  num: number;
 
  @Column({ comment: '已领取' })
  receivedNum: number;
 
  @Column({ comment: '开始时间' })
  startTime: Date;
 
  @Column({ comment: '结束时间' })
  endTime: Date;
 
  @Column({ comment: '状态 0-禁用 1-启用', default: 0 })
  status: number;
 
  @Column({ comment: '条件', type: 'json' })
  condition: {
    // 满多少金额
    fullAmount: number;
  };
}