<?php

namespace app\model;

use DateTimeInterface;
use support\Model;

class CardBatch extends Model
{
    public $table = 'card_batch';

    public $primaryKey = 'card_batch_id';

    protected $dateFormat = 'U';

    const CREATED_AT = 'card_batch_addtimes';

    const UPDATED_AT = null;


    // 批次状态 CREATE=已创建|PRODUCTED=制作完成|ENABLED=启用|DISABLED=禁用
    public const CARD_BATCH_STATUS = ['CREATE' => '已创建', 'PRODUCTED' => '制作完成', 'ENABLED' => '启用', 'DISABLED' => '禁用'];

    public function serializeDate(DateTimeInterface $date)
    {
        return $date->format('Y-m-d H:i:s');
    }
}