<?php
/********************************************************************************
 * (c)1337 aheadware.com - All rights reserved
 ********************************************************************************/

/**
 * Class TB_Shared_Ent_TeamData_AdminNote
 *
 * @property integer $id
 * @property string|NULL $fk_publicTeamID
 * @property integer|NULL $fk_TeamID
 * @property string|NULL $displayName
 * @property string|NULL $Invoice_number
 * @property string|NULL $status
 * @property string|NULL $status_visible
 * @property string|NULL $product
 * @property integer|NULL $product_volume
 * @property string|NULL $product_type
 * @property string|NULL $create_dt
 * @property string|NULL $valid_from
 * @property string|NULL $valid_to
 * @property integer|NULL $contracted_period
 * @property float|NULL $price_regularMonth
 * @property float|NULL $price_discount
 * @property float|NULL $price_discountedMonth
 * @property float|NULL $price_discountedTotal
 * @property float|NULL $price_VAT
 * @property string|NULL $Invoice_DisplayName
 * @property string|NULL $Invoice_firstName
 * @property string|NULL $Invoice_lastName
 * @property string|NULL $Invoice_street
 * @property string|NULL $Invoice_town
 * @property string|NULL $Invoice_PLZ
 * @property string|NULL $invoice_country
 * @property string|NULL $Invoice_eMail
 * @property string|NULL $Invoice_website
 * @property string|NULL $sales_nextStep
 * @property string|NULL $sales_status
 *
 */
class TB_Shared_Ent_TeamData_ZContracts extends Francis_Db_Row
{

    public static function getByTeamId( $teamId )
    {
        $sql = 'SELECT * FROM ' . self::getTable() . ' WHERE fk_TeamID = :team_id';
        $params = array( ':team_id' => $teamId );
        return self::findMany($sql, $params );
    }
        /**
     * Return table name
     *
     * @return null|string
     */
    public static function getTable()
    {
        return 'z_contracts';
    }

    /**
     * Return db handler
     *
     * @return Francis_Db_MySql|null
     */
    public static function getDbh()
    {
        return TB_Shared_Db_TeamData::get();
    }


}