Files
bini-google-tv/backend/models/GoogleConfig.js

19 lines
550 B
JavaScript

const mongoose = require("mongoose");
const googleConfigSchema = new mongoose.Schema(
{
key: { type: String, required: true, unique: true }, // e.g., 'photos_auth'
tokens: {
access_token: String,
refresh_token: String,
scope: String,
token_type: String,
expiry_date: Number,
},
albumId: { type: String }, // Optional: to filter by a specific album
},
{ timestamps: true }
);
module.exports = mongoose.model("GoogleConfig", googleConfigSchema);