chore: src/modules/user/entity/address.ts

This commit is contained in:
2026-07-01 17:57:38 +08:00
parent 339b93464a
commit 73d3f84343
+34
View File
@@ -0,0 +1,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;
}