2023-02-09 22:21:20 -06:00
|
|
|
import { type RecordValue } from './RecordValue';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @class Record - A record in an app.
|
|
|
|
|
*/
|
|
|
|
|
export class Record {
|
|
|
|
|
/**
|
|
|
|
|
* @property {number} appId - The id of the app that the record belongs to.
|
|
|
|
|
*/
|
|
|
|
|
public appId: number;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @property {number} recordId - The id of the record.
|
|
|
|
|
*/
|
|
|
|
|
public recordId: number;
|
|
|
|
|
|
|
|
|
|
/**
|
2023-02-10 00:49:50 -06:00
|
|
|
* @property {RecordValue[]} fieldData - The data for the fields in the record.
|
2023-02-09 22:21:20 -06:00
|
|
|
*/
|
2023-02-10 00:49:50 -06:00
|
|
|
public fieldData: RecordValue[];
|
2023-02-09 22:21:20 -06:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @constructor - Creates a new instance of Record.
|
|
|
|
|
* @param {number} appId - The id of the app that the record belongs to.
|
|
|
|
|
* @param {number} recordId - The id of the record.
|
2023-02-10 00:49:50 -06:00
|
|
|
* @param {RecordValue[]} fieldData - The data for the fields in the record.
|
2023-02-09 22:21:20 -06:00
|
|
|
* @returns {Record} - A new instance of Record.
|
|
|
|
|
*/
|
2023-02-12 22:14:55 -06:00
|
|
|
constructor(appId: number, recordId: number, fieldData: RecordValue[] = []) {
|
2023-02-09 22:21:20 -06:00
|
|
|
this.appId = appId;
|
|
|
|
|
this.recordId = recordId;
|
|
|
|
|
this.fieldData = fieldData;
|
|
|
|
|
}
|
|
|
|
|
}
|