<?php

namespace Kylin\Catering\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * 经营统计
 */
class Statistic extends Model
{
    protected $table = 'catering_statistics';
    protected $fillable = [
        'date',
        'revenue',
        'cost',
        'profit',
        'customer_count',
        'order_count',
        'avg_order_amount',
    ];

    protected $casts = [
        'date' => 'date',
        'revenue' => 'decimal:2',
        'cost' => 'decimal:2',
        'profit' => 'decimal:2',
        'customer_count' => 'integer',
        'order_count' => 'integer',
        'avg_order_amount' => 'decimal:2',
    ];
}
