Firestorm- firestore 的 ORM 框架

网友投稿 865 2022-10-14 23:58:21

Firestorm- firestore 的 ORM 框架

Firestorm 是一个 firestore 的 TypeScript ORM 框架。

示例代码:

import * as firestorm from 'firebase-firestorm';...const firestore = firebase.initializeApp(...);firestorm.initialize(firestore, /* options */);@rootCollection({ name: 'posts',})export default class Post extends Entity { @field({ name: 'title' }) title!: string; @field({ name: 'content' }) content!: string;}export default class Comment extends Entity { @field({ name: 'content' }) content!: string; @field({ name: 'by' }) by!: string;}

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:Linux编程入门三网络编程二
下一篇:3039.顺序查找关键字
相关文章