CardBatch.php 645 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\model;
  3. use DateTimeInterface;
  4. use support\Model;
  5. class CardBatch extends Model
  6. {
  7. public $table = 'card_batch';
  8. public $primaryKey = 'card_batch_id';
  9. protected $dateFormat = 'U';
  10. const CREATED_AT = 'card_batch_addtimes';
  11. const UPDATED_AT = null;
  12. // 批次状态 CREATE=已创建|PRODUCTED=制作完成|ENABLED=启用|DISABLED=禁用
  13. public const CARD_BATCH_STATUS = ['CREATE' => '已创建', 'PRODUCTED' => '制作完成', 'ENABLED' => '启用', 'DISABLED' => '禁用'];
  14. public function serializeDate(DateTimeInterface $date)
  15. {
  16. return $date->format('Y-m-d H:i:s');
  17. }
  18. }