wangzhibo
7 天以前 665ba0f9ae078c2859209451a163d10515171d11
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
import { BaseEntity } from '../../base/entity/base';
import { Entity, Column, Index } from 'typeorm';
 
/**
 * 用户模块-收货地址
 */
@Entity('user_address')
export class UserAddressEntity extends BaseEntity {
  @Index()
  @Column({ comment: '用户ID' })
  userId: number;
 
  @Column({ comment: '联系人' })
  contact: string;
 
  @Index()
  @Column({ comment: '手机号', length: 11 })
  phone: string;
 
  @Column({ comment: '省' })
  province: string;
 
  @Column({ comment: '市' })
  city: string;
 
  @Column({ comment: '区' })
  district: string;
 
  @Column({ comment: '地址' })
  address: string;
 
  @Column({ comment: '是否默认', default: false })
  isDefault: boolean;
}