chat pic
This commit is contained in:
@@ -1,6 +1,18 @@
|
||||
const mongoose = require('mongoose')
|
||||
const timestamp = require('mongoose-timestamp')
|
||||
|
||||
// متنهای روی استوری با مختصات نسبی (۰ تا ۱) تا در هر ابعادی درست رندر شوند
|
||||
const overlaySchema = new mongoose.Schema({
|
||||
text: { type: String, default: '' },
|
||||
x: { type: Number, default: 0.5 },
|
||||
y: { type: Number, default: 0.5 },
|
||||
font_size: { type: Number, default: 0.06 },
|
||||
color: { type: String, default: '#ffffff' },
|
||||
background: { type: String, default: '' },
|
||||
rotation: { type: Number, default: 0 },
|
||||
align: { type: String, default: 'center' }
|
||||
}, { _id: false })
|
||||
|
||||
const storySchema = new mongoose.Schema({
|
||||
user_id: {
|
||||
type: mongoose.Schema.Types.ObjectId,
|
||||
@@ -17,6 +29,10 @@ const storySchema = new mongoose.Schema({
|
||||
enum: ['image', 'video'],
|
||||
required: true
|
||||
},
|
||||
overlays: {
|
||||
type: [overlaySchema],
|
||||
default: []
|
||||
},
|
||||
expires_at: {
|
||||
type: Date,
|
||||
required: true,
|
||||
|
||||
Reference in New Issue
Block a user