| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn } from 'typeorm';
- export enum Gender {
- MALE = 1,
- FEMALE = 2,
- OTHER = 3
- }
- export enum CertificationStatus {
- UNCERTIFIED = 0,
- PENDING = 1,
- CERTIFIED = 2,
- REJECTED = 3
- }
- export enum JobSeekingStatus {
- NOT_SEEKING = 0,
- ACTIVELY_SEEKING = 1,
- OPEN_TO_OPPORTUNITIES = 2
- }
- @Entity('silver_user_profiles')
- export class SilverUserProfile {
- @PrimaryGeneratedColumn({ unsigned: true })
- id!: number;
- @Column({ name: 'user_id', type: 'int', unsigned: true })
- userId!: number;
- // 基本信息
- @Column({ name: 'real_name', type: 'varchar', length: 50 })
- realName!: string;
- @Column({ name: 'nickname', type: 'varchar', length: 50, nullable: true })
- nickname!: string | null;
- @Column({ name: 'organization', type: 'varchar', length: 255, nullable: true })
- organization!: string | null;
- @Column({ name: 'age', type: 'int', unsigned: true })
- age!: number;
- @Column({ name: 'gender', type: 'tinyint', unsigned: true })
- gender!: Gender;
- @Column({ name: 'phone', type: 'varchar', length: 20 })
- phone!: string;
- @Column({ name: 'email', type: 'varchar', length: 255, nullable: true })
- email!: string | null;
- @Column({ name: 'avatar_url', type: 'varchar', length: 500, nullable: true })
- avatarUrl!: string | null;
- @Column({ name: 'personal_intro', type: 'text', nullable: true })
- personalIntro!: string | null;
- @Column({ name: 'personal_skills', type: 'text', nullable: true })
- personalSkills!: string | null;
- @Column({ name: 'personal_experience', type: 'text', nullable: true })
- personalExperience!: string | null;
- // 认证信息
- @Column({ name: 'certification_status', type: 'tinyint', default: CertificationStatus.UNCERTIFIED })
- certificationStatus!: CertificationStatus;
- @Column({ name: 'certification_info', type: 'text', nullable: true })
- certificationInfo!: string | null;
- // 求职需求
- @Column({ name: 'job_seeking_status', type: 'tinyint', default: JobSeekingStatus.NOT_SEEKING })
- jobSeekingStatus!: JobSeekingStatus;
- @Column({ name: 'job_seeking_requirements', type: 'text', nullable: true })
- jobSeekingRequirements!: string | null;
- // 统计信息
- @Column({ name: 'total_points', type: 'int', unsigned: true, default: 0 })
- totalPoints!: number;
- @Column({ name: 'resume_count', type: 'int', unsigned: true, default: 0 })
- resumeCount!: number;
- @Column({ name: 'application_count', type: 'int', unsigned: true, default: 0 })
- applicationCount!: number;
- @Column({ name: 'time_bank_hours', type: 'decimal', precision: 10, scale: 2, default: 0 })
- timeBankHours!: number;
- @Column({ name: 'knowledge_contributions', type: 'int', unsigned: true, default: 0 })
- knowledgeContributions!: number;
- @CreateDateColumn({ name: 'created_at' })
- createdAt!: Date;
- @UpdateDateColumn({ name: 'updated_at' })
- updatedAt!: Date;
- @Column({ name: 'created_by', type: 'int', nullable: true })
- createdBy!: number | null;
- @Column({ name: 'updated_by', type: 'int', nullable: true })
- updatedBy!: number | null;
- }
|