ApiModel.ts 406 B

12345678910111213141516171819
  1. import { Model } from "pinia-orm";
  2. import {Uid} from "pinia-orm/dist/decorators";
  3. export class ApiModel extends Model {
  4. @Uid()
  5. id!: number | string
  6. /**
  7. * Does the entity exists in the data source
  8. */
  9. persisted: boolean = false
  10. /**
  11. * The entity as it was when it was fetched from the data source
  12. */
  13. initialState: object | null = null
  14. }
  15. export default ApiModel