<commit_before><?php

namespace common\models;

use yii;

/**
 * This is the model class for table "{{%blog_status}}".
 *
 * @property integer $id
 * @property string $code
 * @property string $description
 * @property integer $is_deleted
 *
 * @property Blog[] $blogs
 */
class BlogStatus extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%blog_status}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['code'], 'required'],
            [['is_deleted'], 'integer'],
            [['code', 'description'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'code' => 'Code',
            'description' => 'Description',
            'is_deleted' => 'Is Deleted',
        ];<commit_msg>Witty_CMS-7 Set blog status as unique field<commit_after><?php

namespace common\models;

use yii;

/**
 * This is the model class for table "{{%blog_status}}".
 *
 * @property integer $id
 * @property string $code
 * @property string $description
 * @property integer $is_deleted
 *
 * @property Blog[] $blogs
 */
class BlogStatus extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%blog_status}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['code'], 'required'],
            [['code'], 'unique'],
            [['is_deleted'], 'integer'],
            [['code', 'description'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'code' => 'Code',
            'description' => 'Description',
            'is_deleted' => 'Is Deleted',
        ];
{'fraction_non_alphanumeric': 0.16598569969356486, 'fraction_numerical': 0.003575076608784474, 'mean_word_length': 1.9151785714285714, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3716598', 'n_tokens_mistral': 586, 'n_tokens_neox': 582, 'n_words': 142}