mirror of
https://github.com/geekgeekrun/geekgeekrun.git
synced 2026-05-11 18:09:50 +08:00
add the view of chatStartupLog
This commit is contained in:
63
packages/sqlite-plugin/src/entity/VChatStartupLog.ts
Normal file
63
packages/sqlite-plugin/src/entity/VChatStartupLog.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import { requireTypeorm } from "../utils/module-loader";
|
||||
const { ViewEntity, ViewColumn } = requireTypeorm();
|
||||
@ViewEntity({
|
||||
expression: `SELECT
|
||||
job_info.*,
|
||||
user_info.name as userName,
|
||||
chat_startup_log.date,
|
||||
boss_info.name AS bossName,
|
||||
company_info.name AS companyName
|
||||
FROM
|
||||
chat_startup_log
|
||||
LEFT JOIN job_info ON chat_startup_log.encryptJobId = job_info.encryptJobId
|
||||
LEFT JOIN user_info ON chat_startup_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 VChatStartupLog {
|
||||
@ViewColumn()
|
||||
encryptJobId: number;
|
||||
|
||||
@ViewColumn()
|
||||
jobName: string;
|
||||
|
||||
@ViewColumn()
|
||||
positionName: string;
|
||||
|
||||
@ViewColumn()
|
||||
salaryLow: number | null;
|
||||
|
||||
@ViewColumn()
|
||||
salaryHeigh: 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()
|
||||
companyName: string;
|
||||
}
|
||||
@@ -12,6 +12,7 @@ import { JobInfo } from "./entity/JobInfo";
|
||||
import { JobInfoChangeLog } from "./entity/JobInfoChangeLog";
|
||||
import { BossActiveStatusRecord } from "./entity/BossActiveStatusRecord";
|
||||
import { UserInfo } from "./entity/UserInfo";
|
||||
import { VChatStartupLog } from "./entity/VChatStartupLog";
|
||||
|
||||
import sqlite3 from 'sqlite3';
|
||||
import * as cliHighlight from 'cli-highlight';
|
||||
@@ -36,6 +37,7 @@ export function initDb(dbFilePath) {
|
||||
JobInfoChangeLog,
|
||||
BossActiveStatusRecord,
|
||||
UserInfo,
|
||||
VChatStartupLog
|
||||
],
|
||||
});
|
||||
return appDataSource.initialize();
|
||||
|
||||
Reference in New Issue
Block a user