This commit is contained in:
payacom
2026-09-13 21:32:36 +03:30
parent 90c5f94b57
commit c302aea177
49 changed files with 4063 additions and 920 deletions

View File

@@ -5,11 +5,21 @@ const timestamp = require('mongoose-timestamp')
// type مشخص می‌کنه اورلی متنیه یا لینکِ یکی از موارد قابل‌لینک (پکیج/پروژه/بیلبورد/فروشگاه/
// کالا/رزرو، همون‌هایی که توی ثبت پست هم قابل‌لینک‌ان)
const overlaySchema = new mongoose.Schema({
type: { type: String, enum: ['text', 'link'], default: 'text' },
type: { type: String, enum: ['text', 'link', 'mention', 'hashtag', 'location', 'sticker'], default: 'text' },
// text: متن آزاد (type:'text') | متن تگ بدون # (type:'hashtag') | نام مکان (type:'location') |
// خودِ ایموجی (type:'sticker')
text: { type: String, default: '' },
x: { type: Number, default: 0.5 },
y: { type: Number, default: 0.5 },
font_size: { type: Number, default: 0.06 },
// فقط برای type:'text' — کدوم واریانت فونتِ برندِ اپ (Vazir/IRANSansX) استفاده بشه؛
// چون اپ فعلاً فقط یک خانواده‌فونت با وزن‌های مختلف داره (نه چند تایپ‌فیس واقعیِ جدا مثل
// اینستاگرام)، این همون گزینه‌های واقعاً موجودیه
font_family: {
type: String,
enum: ['light', 'regular', 'medium', 'bold', 'black'],
default: 'bold'
},
color: { type: String, default: '#ffffff' },
background: { type: String, default: '' },
rotation: { type: Number, default: 0 },
@@ -17,7 +27,10 @@ const overlaySchema = new mongoose.Schema({
// فقط برای type:'link'
link_kind: { type: String, default: null },
link_id: { type: String, default: null },
link_title: { type: String, default: null }
link_title: { type: String, default: null },
// فقط برای type:'mention'
mention_user_id: { type: String, default: null },
mention_username: { type: String, default: null }
}, { _id: false })
const storySchema = new mongoose.Schema({