我正在编写一个 React Native 应用程序,为具有创建日期字段以及 Firestore 中过期日期的用户创建优惠券。过期日期是创建日期加上一些天数(例如 7)
理想情况下,我想在我的 firebase 函数中使用 firestore.FieldValue.serverTimestamp() 来创建日期,并为此添加 7 天作为到期时间,以避免用户生成日期。
有办法做到这一点吗?
firebase react-native google-cloud-firestore
firebase ×1
google-cloud-firestore ×1
react-native ×1