uid
Usage
User.js
import { Model } from 'pinia-orm'class User extends Model { static entity = 'users' static fields () { return { id: this.uid() } }}
With Decorator
User.ts
import { Model } from 'pinia-orm'import { Uid } from 'pinia-orm/dist/decorators'class User extends Model { static entity = 'users' @Uid() declare id: string}
Typescript Declarations
function uid(): Uid
Table of Contents