AdminLTE3

This commit is contained in:
2025-10-26 22:14:47 +09:00
parent 291fc63a4c
commit 9974811a3e
226 changed files with 88284 additions and 3406 deletions

View File

@@ -19,18 +19,26 @@ const Service = sequelize.define('Service', {
},
description: {
type: DataTypes.TEXT,
allowNull: false
allowNull: true
},
shortDescription: {
type: DataTypes.STRING(150),
allowNull: false
type: DataTypes.STRING(500),
allowNull: true
},
icon: {
type: DataTypes.STRING,
allowNull: false
allowNull: true,
defaultValue: 'fas fa-cog'
},
category: {
type: DataTypes.ENUM('development', 'design', 'consulting', 'marketing', 'maintenance'),
type: DataTypes.ENUM(
'web-development',
'mobile-development',
'ui-ux-design',
'consulting',
'support',
'other'
),
allowNull: false
},
features: {
@@ -39,25 +47,12 @@ const Service = sequelize.define('Service', {
},
pricing: {
type: DataTypes.JSONB,
allowNull: false,
validate: {
isValidPricing(value) {
if (!value.basePrice || value.basePrice < 0) {
throw new Error('Base price must be a positive number');
}
}
}
allowNull: true,
defaultValue: {}
},
estimatedTime: {
type: DataTypes.JSONB,
allowNull: false,
validate: {
isValidTime(value) {
if (!value.min || !value.max || value.min > value.max) {
throw new Error('Invalid estimated time range');
}
}
}
type: DataTypes.STRING,
allowNull: true
},
isActive: {
type: DataTypes.BOOLEAN,
@@ -72,7 +67,7 @@ const Service = sequelize.define('Service', {
defaultValue: 0
},
tags: {
type: DataTypes.ARRAY(DataTypes.STRING),
type: DataTypes.JSONB,
defaultValue: []
},
seo: {