Files
Showy/backend/models/WatchBuddy.js
X4Lo e82b905886 Add Watch Buddies feature
- Created WatchBuddy model
- M:N junctions to EntrySeen/EpisodeSeen
  and Media relation for profile pictures
- Full CRUD + search + profile picture upload
- WatchBuddySelect multi-select with search and inline create, replaced
  all seen_with text inputs
- WatchBuddiesPage (grid) and WatchBuddyProfilePage (edit form,
  icon-based contacts, poster-grid watch history, monthly timeline)
2026-06-25 03:11:14 +01:00

21 lines
776 B
JavaScript

const { DataTypes } = require("sequelize");
const sequelize = require("../config/database");
const WatchBuddy = sequelize.define("watch_buddy", {
id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true },
name: { type: DataTypes.STRING(100), allowNull: false },
gender: { type: DataTypes.STRING(20), allowNull: true },
instagram: { type: DataTypes.STRING(100), allowNull: true },
discord: { type: DataTypes.STRING(100), allowNull: true },
phone: { type: DataTypes.STRING(30), allowNull: true },
email: { type: DataTypes.STRING(100), allowNull: true },
note: { type: DataTypes.STRING(2000), allowNull: true },
buddy_type: {
type: DataTypes.STRING(20),
defaultValue: "person",
allowNull: false,
},
});
module.exports = WatchBuddy;