TimestampBehavior::class, 'createdAtAttribute' => 'created_at', 'updatedAtAttribute' => 'updated_at', 'value' => new Expression('NOW()'), ], ]; } /** * {@inheritdoc} */ public static function tableName() { return 'file'; } /** * {@inheritdoc} */ public function rules() { return [ [['path'], 'string'], [['created_at', 'updated_at'], 'safe'], [['status'], 'integer'], [['name', 'type', 'mime-type', 'url'], 'string', 'max' => 255], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ 'id' => 'ID', 'name' => 'Name', 'path' => 'Path', 'url' => 'URL', 'type' => 'Type', 'mime-type' => 'Mime Type', 'created_at' => 'Created At', 'updated_at' => 'Updated At', 'status' => 'Status', ]; } }