add: profile backgrounds
This commit is contained in:
parent
6dd0b88050
commit
4e64397635
14 changed files with 205 additions and 4 deletions
|
|
@ -124,6 +124,19 @@ export class MiUser {
|
|||
@JoinColumn()
|
||||
public banner: MiDriveFile | null;
|
||||
|
||||
@Column({
|
||||
...id(),
|
||||
nullable: true,
|
||||
comment: 'The ID of background DriveFile.',
|
||||
})
|
||||
public backgroundId: MiDriveFile['id'] | null;
|
||||
|
||||
@OneToOne(type => MiDriveFile, {
|
||||
onDelete: 'SET NULL',
|
||||
})
|
||||
@JoinColumn()
|
||||
public background: MiDriveFile | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
})
|
||||
|
|
@ -134,6 +147,11 @@ export class MiUser {
|
|||
})
|
||||
public bannerUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 512, nullable: true,
|
||||
})
|
||||
public backgroundUrl: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
})
|
||||
|
|
@ -144,6 +162,11 @@ export class MiUser {
|
|||
})
|
||||
public bannerBlurhash: string | null;
|
||||
|
||||
@Column('varchar', {
|
||||
length: 128, nullable: true,
|
||||
})
|
||||
public backgroundBlurhash: string | null;
|
||||
|
||||
@Index()
|
||||
@Column('varchar', {
|
||||
length: 128, array: true, default: '{}',
|
||||
|
|
|
|||
|
|
@ -122,6 +122,15 @@ export const packedUserDetailedNotMeOnlySchema = {
|
|||
type: 'string',
|
||||
nullable: true, optional: false,
|
||||
},
|
||||
backgroundUrl: {
|
||||
type: 'string',
|
||||
format: 'url',
|
||||
nullable: true, optional: false,
|
||||
},
|
||||
backgroundBlurhash: {
|
||||
type: 'string',
|
||||
nullable: true, optional: false,
|
||||
},
|
||||
isLocked: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: false,
|
||||
|
|
@ -304,6 +313,11 @@ export const packedMeDetailedOnlySchema = {
|
|||
nullable: true, optional: false,
|
||||
format: 'id',
|
||||
},
|
||||
backgroundId: {
|
||||
type: 'string',
|
||||
nullable: true, optional: false,
|
||||
format: 'id',
|
||||
},
|
||||
injectFeaturedNote: {
|
||||
type: 'boolean',
|
||||
nullable: true, optional: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue