<?php

class Config {

    const MB = 1048576;
    const IMAGE_EXTENSIONS = [
                                'jpeg',
                                'jpg',
                                'gif',
                                'png'
                            ];

    const IMAGE_UPLOAD_SIZE = 5 * self::MB;

    const TYPE_POST = 'post';
    const TYPE_PAGE = 'page';
    const STATUS_PUBLISH = 'publish';
    const STATUS_DRAFT = 'draft';                   

    const POST_PARAMS_REQ = [
                                'api_key' => 'required',
                                'title' => 'required',
                                'body' => 'required',
                                'type' => "required|in:". self::TYPE_PAGE . ',' . self::TYPE_POST,
                                'status' => "required|in:". self::STATUS_PUBLISH . ',' . self::STATUS_DRAFT,
                                'publish_at' => 'date_format:Y-m-d'
                            ];

    const BW_PREFIX = 'bw_';

}