Overview
TheChef model manages chef profiles in the restaurant management system. It stores personal information, specialties, work areas, and maintains a relationship with the user authentication system.
Table Information
Table Name:
chefsModel Definition
Fillable Fields
Chef’s first name
- Database Type:
string - Validation: Required, max 255 characters
- Example: “Gordon”
Chef’s last name
- Database Type:
string - Validation: Nullable, max 255 characters
- Example: “Ramsay”
Chef’s culinary specialty
- Database Type:
string - Validation: Required, max 255 characters
- Example: “Italian Cuisine”, “Pastry Chef”
Detailed description of the chef’s background and experience
- Database Type:
text - Validation: Nullable
- Example: “Award-winning chef with 20 years of experience in fine dining establishments”
Work area assigned to the chef
- Database Type:
enum - Validation: Required, must be one of the allowed values
- Allowed Values:
preparacion- Preparation areacocinar- Cooking stationservir- Service/plating areaalmacenamiento- Storage managementlavar- Dishwashing/cleaningpedidos- Order management
- Example: “cocinar”
Path to the chef’s profile image
- Database Type:
string - Validation: Nullable, image file (jpeg, png, jpg, gif), max 2048KB
- Example: “images/chefs/gordon-ramsay.jpg”
Area Types
Preparation area - handling initial food preparation and mise en place
Cooking station - main cooking and culinary execution
Service area - food plating and presentation
Storage management - inventory and ingredient storage
Dishwashing and cleaning - kitchen sanitation
Order management - coordinating and managing incoming orders
Relationships
belongsTo: User
Validation Rules
TheChefProfileRequest defines the following validation rules:
Authorization
Database Schema
Usage Examples
Creating a Chef Profile
Querying Chefs
Updating Chef Information
Working with Relationships
Timestamps
created_at: Automatically set when the chef profile is createdupdated_at: Automatically updated when the chef profile is modified
Security Notes
When deleting a user account with
usertype = 'chef', the associated chef profile will be automatically deleted due to the CASCADE constraint on the user_id foreign key.