WIP - manually sharing records

This commit is contained in:
Francisco Gaona
2025-12-30 18:29:20 +01:00
parent 6c29d18696
commit e73126bcb7
9 changed files with 830 additions and 80 deletions

View File

@@ -9,6 +9,18 @@ export interface RecordShareAccessLevel {
export class RecordShare extends BaseModel {
static tableName = 'record_shares';
// Disable automatic snake_case conversion for this table
static get columnNameMappers() {
return {
parse(obj: any) {
return obj;
},
format(obj: any) {
return obj;
},
};
}
id!: string;
objectDefinitionId!: string;
recordId!: string;
@@ -37,8 +49,8 @@ export class RecordShare extends BaseModel {
canDelete: { type: 'boolean' },
},
},
expiresAt: { type: 'string', format: 'date-time' },
revokedAt: { type: 'string', format: 'date-time' },
expiresAt: { type: ['string', 'null'], format: 'date-time' },
revokedAt: { type: ['string', 'null'], format: 'date-time' },
},
};
}