| 1 | /* |
| 2 | * @Author: nevin |
| 3 | * @Date: 2025-01-20 16:24:16 |
| 4 | * @LastEditTime: 2025-01-21 21:35:35 |
| 5 | * @LastEditors: nevin |
| 6 | * @Description: 平台用户 |
| 7 | */ |
| 8 | import { Entity, PrimaryColumn, Column } from 'typeorm'; |
| 9 | import { TempModel } from './temp'; |
| 10 | |
| 11 | @Entity({ name: 'user' }) |
| 12 | export class UserModel extends TempModel { |
| 13 | @PrimaryColumn({ type: 'varchar', nullable: false, comment: '用户id' }) // 主键 |
| 14 | id!: string; |
| 15 | |
| 16 | @Column({ type: 'varchar', nullable: false, comment: '用户名称' }) |
| 17 | name!: string; |
| 18 | |
| 19 | @Column({ type: 'varchar', nullable: false, comment: '用户手机号' }) |
| 20 | phone!: string; |
| 21 | |
| 22 | @Column({ type: 'varchar', nullable: true, comment: '用户微信openid' }) |
| 23 | wxOpenId!: string; |
| 24 | |
| 25 | @Column({ type: 'datetime', nullable: false, comment: '登录时间' }) |
| 26 | loginTime!: Date; |
| 27 | } |
| 28 |