16 lines
571 B
JavaScript
16 lines
571 B
JavaScript
const mongoose = require('mongoose');
|
|
|
|
const brandSchema = new mongoose.Schema({
|
|
name: { type: String, required: true, trim: true, unique: true },
|
|
slug: { type: String, required: true, unique: true, lowercase: true },
|
|
logo: { type: String, default: '' },
|
|
description: { type: String, default: '' },
|
|
website: { type: String, default: '' },
|
|
metaTitle: { type: String, default: '' },
|
|
metaDescription: { type: String, default: '' },
|
|
isActive: { type: Boolean, default: true }
|
|
}, { timestamps: true });
|
|
|
|
module.exports = mongoose.model('Brand', brandSchema);
|
|
|