<?php


namespace NilPortugues\SqlSchemaBuilder\Schema;


/**
 * Interface ColumnMigrationInterface
 * @package NilPortugues\SqlSchemaBuilder\Schema
 */
interface ColumnMigrationInterface
{
    /**
     * Sets the column name.
     *
     * @param string $name
     *
     * @return $this
     */
    public function setName($name);

    /**
     * Gets the column name.
     *
     * @return string
     */
    public function getName();

    /**
     * Sets the column type.
     *
     * @param string $type
     *
     * @return $this
     */
    public function setType($type);

    /**
     * Gets the column type.
     *
     * @return string
     */
    public function getType();

    /**
     * Sets the column limit.
     *
     * @param integer $limit
     *
     * @return $this
     */
    public function setLimit($limit);

    /**
     * Gets the column limit.
     *
     * @return integer
     */
    public function getLimit();


    /**
     * Sets whether the column allows nulls.
     *
     * @param boolean $null
     *
     * @return $this
     */
    public function setNull($null);

    /**
     * Gets whether the column allows nulls.
     *
     * @return boolean
     */
    public function getNull();


    /**
     * Does the column allow nulls?
     *
     * @return boolean
     */
    public function isNull();

    /**
     * Sets the default column value.
     *
     * @param mixed $default
     *
     * @return $this
     */
    public function setDefault($default);

    /**
     * Gets the default column value.
     *
     * @return mixed
     */
    public function getDefault();

    /**
     * Sets whether or not the column is an identity column.
     *
     * @param boolean $identity
     *
     * @return $this
     */
    public function setIdentity($identity);

    /**
     * Gets whether or not the column is an identity column.
     *
     * @return boolean
     */
    public function getIdentity();

    /**
     * Is the column an identity column?
     *
     * @return boolean
     */
    public function isIdentity();

    /**
     * Sets the name of the column to add this column after.
     *
     * @param string $after After
     *
     * @return $this
     */
    public function setAfter($after);

    /**
     * Returns the name of the column to add this column after.
     *
     * @return string
     */
    public function getAfter();


    /**
     * Sets the 'ON UPDATE' mysql column function.
     *
     * @param  string $update On Update function
     *
     * @return $this
     */
    public function setUpdate($update);

    /**
     * Returns the value of the ON UPDATE column function.
     *
     * @return string
     */
    public function getUpdate();


    /**
     * Sets the column precision for decimal.
     *
     * @param integer $precision
     *
     * @return $this
     */
    public function setPrecision($precision);

    /**
     * Gets the column precision for decimal.
     *
     * @return integer
     */
    public function getPrecision();

    /**
     * Sets the column scale for decimal.
     *
     * @param integer $scale
     *
     * @return $this
     */
    public function setScale($scale);

    /**
     * Gets the column scale for decimal.
     *
     * @return integer
     */
    public function getScale();

    /**
     * Sets the column comment.
     *
     * @param string $comment
     *
     * @return $this
     */
    public function setComment($comment);

    /**
     * Gets the column comment.
     *
     * @return string
     */
    public function getComment();

    /**
     * Sets whether field should be signed.
     *
     * @param bool $signed
     *
     * @return $this
     */
    public function setSigned($signed);

    /**
     * Gets whether field should be signed.
     *
     * @return string
     */
    public function getSigned();

    /**
     * Should the column be signed?
     *
     * @return boolean
     */
    public function isSigned();


    /**
     * Sets field properties.
     *
     * @param array $properties
     *
     * @return $this
     */
    public function setProperties(array $properties);

    /**
     * Gets field properties
     *
     * @return array
     */
    public function getProperties();

    /**
     * Utility method that maps an array of column options to this objects methods.
     *
     * @param array $options Options
     *
     * @return $this
     */
    public function setOptions(array $options);
} 