refactor: prefix Mi for all entities (#11719)
* wip
* wip
* wip
* wip
* Update RepositoryModule.ts
* wip
* wip
* wip
* Revert "wip"
This reverts commit c1c13b37d2
.
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
|
||||
import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typeorm';
|
||||
import { id } from '../id.js';
|
||||
import { User } from './User.js';
|
||||
import { DriveFolder } from './DriveFolder.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiDriveFolder } from './DriveFolder.js';
|
||||
|
||||
@Entity()
|
||||
@Entity('drive_file')
|
||||
@Index(['userId', 'folderId', 'id'])
|
||||
export class DriveFile {
|
||||
export class MiDriveFile {
|
||||
@PrimaryColumn(id())
|
||||
public id: string;
|
||||
|
||||
@@ -26,13 +26,13 @@ export class DriveFile {
|
||||
nullable: true,
|
||||
comment: 'The owner ID.',
|
||||
})
|
||||
public userId: User['id'] | null;
|
||||
public userId: MiUser['id'] | null;
|
||||
|
||||
@ManyToOne(type => User, {
|
||||
@ManyToOne(type => MiUser, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: User | null;
|
||||
public user: MiUser | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
@@ -146,13 +146,13 @@ export class DriveFile {
|
||||
nullable: true,
|
||||
comment: 'The parent folder ID. If null, it means the DriveFile is located in root.',
|
||||
})
|
||||
public folderId: DriveFolder['id'] | null;
|
||||
public folderId: MiDriveFolder['id'] | null;
|
||||
|
||||
@ManyToOne(type => DriveFolder, {
|
||||
@ManyToOne(type => MiDriveFolder, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public folder: DriveFolder | null;
|
||||
public folder: MiDriveFolder | null;
|
||||
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
|
Reference in New Issue
Block a user