*/ abstract class CafelFood extends CafelClientModel { /** * Unique columns key * * @var array */ public const UNIQUE_COLUMN_KEYS = [ 'batch_code', 'delivery_date' ]; /** * Validation rules from cafel Api * * @var array */ protected static $validationRules = [ // 1 Pondeuse ou 2 Poulet . 'food_type' => ['required', [EnumIsValidRule::class, FoodType::class]], // Eg 19377/0 . 'batch_code' => [ 'required', 'max:10', 'regex:/^[0-9A-Z]+\/(?:\d|[A-Z])$/', ], 'delivery_date' => 'required|date_format:Y-m-d' ]; /** * Column translations * * @var array */ protected static $columnsTranslations = [ 'Food_type' => 'food_type', 'Batch_code' => 'batch_code', 'Delivery_date' => 'delivery_date' ]; }