mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-05-07 04:22:41 +08:00
add the schema of MarkAsNotSuitLog, VMarkAsNotSuitLog schema
This commit is contained in:
28
packages/sqlite-plugin/src/entity/MarkAsNotSuitLog.ts
Normal file
28
packages/sqlite-plugin/src/entity/MarkAsNotSuitLog.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { requireTypeorm } from "../utils/module-loader";
|
||||
import { ChatStartupFrom } from "./ChatStartupLog";
|
||||
const { Entity, Column, PrimaryGeneratedColumn } = requireTypeorm()
|
||||
|
||||
@Entity()
|
||||
export class MarkAsNotSuitLog {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number;
|
||||
|
||||
@Column()
|
||||
encryptJobId: string;
|
||||
|
||||
@Column()
|
||||
encryptCurrentUserId: string;
|
||||
|
||||
@Column()
|
||||
date: Date;
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
markFrom?: ChatStartupFrom;
|
||||
|
||||
@Column({
|
||||
nullable: true
|
||||
})
|
||||
autoStartupChatRecordId?: number;
|
||||
}
|
||||
67
packages/sqlite-plugin/src/entity/VMarkAsNotSuitLog.ts
Normal file
67
packages/sqlite-plugin/src/entity/VMarkAsNotSuitLog.ts
Normal file
@@ -0,0 +1,67 @@
|
||||
import { requireTypeorm } from "../utils/module-loader";
|
||||
const { ViewEntity, ViewColumn } = requireTypeorm();
|
||||
@ViewEntity({
|
||||
expression: `SELECT
|
||||
job_info.*,
|
||||
user_info.name as userName,
|
||||
mark_as_not_suit_log.date,
|
||||
boss_info.name AS bossName,
|
||||
boss_info.title AS bossTitle,
|
||||
company_info.name AS companyName
|
||||
FROM
|
||||
mark_as_not_suit_log
|
||||
LEFT JOIN job_info ON mark_as_not_suit_log.encryptJobId = job_info.encryptJobId
|
||||
LEFT JOIN user_info ON mark_as_not_suit_log.encryptCurrentUserId = user_info.encryptUserId
|
||||
LEFT JOIN boss_info ON boss_info.encryptBossId = job_info.encryptBossId
|
||||
LEFT JOIN company_info ON company_info.encryptCompanyId = job_info.encryptCompanyId
|
||||
`,
|
||||
})
|
||||
export class VMarkAsNotSuitLog {
|
||||
@ViewColumn()
|
||||
encryptJobId: number;
|
||||
|
||||
@ViewColumn()
|
||||
jobName: string;
|
||||
|
||||
@ViewColumn()
|
||||
positionName: string;
|
||||
|
||||
@ViewColumn()
|
||||
salaryLow: number | null;
|
||||
|
||||
@ViewColumn()
|
||||
salaryHigh: number | null;
|
||||
|
||||
@ViewColumn()
|
||||
salaryMonth: number | null;
|
||||
|
||||
@ViewColumn()
|
||||
experienceName: number | null;
|
||||
|
||||
@ViewColumn()
|
||||
publishDate: Date | null;
|
||||
|
||||
@ViewColumn()
|
||||
degreeName: string;
|
||||
|
||||
@ViewColumn()
|
||||
address: string;
|
||||
|
||||
@ViewColumn()
|
||||
description: string;
|
||||
|
||||
@ViewColumn()
|
||||
userName: string;
|
||||
|
||||
@ViewColumn()
|
||||
date: string;
|
||||
|
||||
@ViewColumn()
|
||||
bossName: string;
|
||||
|
||||
@ViewColumn()
|
||||
bossTitle: string;
|
||||
|
||||
@ViewColumn()
|
||||
companyName: string;
|
||||
}
|
||||
@@ -12,10 +12,12 @@ import { JobInfoChangeLog } from "./entity/JobInfoChangeLog";
|
||||
import { BossActiveStatusRecord } from "./entity/BossActiveStatusRecord";
|
||||
import { UserInfo } from "./entity/UserInfo";
|
||||
import { AutoStartChatRunRecord } from './entity/AutoStartChatRunRecord';
|
||||
import { MarkAsNotSuitLog } from "./entity/MarkAsNotSuitLog"
|
||||
import { VChatStartupLog } from "./entity/VChatStartupLog";
|
||||
import { VBossLibrary } from "./entity/VBossLibrary";
|
||||
import { VJobLibrary } from "./entity/VJobLibrary";
|
||||
import { VCompanyLibrary } from "./entity/VCompanyLibrary"
|
||||
import { VMarkAsNotSuitLog } from "./entity/VMarkAsNotSuitLog"
|
||||
|
||||
import sqlite3 from 'sqlite3';
|
||||
import * as cliHighlight from 'cli-highlight';
|
||||
@@ -47,7 +49,9 @@ export function initDb(dbFilePath) {
|
||||
VChatStartupLog,
|
||||
VBossLibrary,
|
||||
VJobLibrary,
|
||||
VCompanyLibrary
|
||||
VCompanyLibrary,
|
||||
MarkAsNotSuitLog,
|
||||
VMarkAsNotSuitLog,
|
||||
],
|
||||
migrations: [
|
||||
UpdateChatStartupLogTable1729182577167
|
||||
|
||||
Reference in New Issue
Block a user