add ticket basics
This commit is contained in:
70
common/models/Ticket.php
Normal file
70
common/models/Ticket.php
Normal file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace common\models;
|
||||
|
||||
use Yii;
|
||||
|
||||
/**
|
||||
* This is the model class for table "ticket".
|
||||
*
|
||||
* @property integer $id_ticket
|
||||
* @property integer $id_user
|
||||
* @property integer $id_ticket_type
|
||||
* @property integer $id_account
|
||||
* @property integer $id_discount
|
||||
* @property string $start
|
||||
* @property string $end
|
||||
* @property integer $max_usage_count
|
||||
* @property integer $usage_count
|
||||
* @property integer $status
|
||||
* @property integer $price_brutto
|
||||
* @property string $comment
|
||||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
class Ticket extends \yii\db\ActiveRecord
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public static function tableName()
|
||||
{
|
||||
return 'ticket';
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
[['id_user', 'id_ticket_type', 'id_account', 'id_discount', 'max_usage_count', 'usage_count', 'status', 'price_brutto'], 'integer'],
|
||||
[['start', 'end', 'created_at', 'updated_at'], 'safe'],
|
||||
[['comment'], 'required'],
|
||||
[['comment'], 'string', 'max' => 255]
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function attributeLabels()
|
||||
{
|
||||
return [
|
||||
'id_ticket' => Yii::t('common/ticket', 'Id Ticket'),
|
||||
'id_user' => Yii::t('common/ticket', 'Id User'),
|
||||
'id_ticket_type' => Yii::t('common/ticket', 'Id Ticket Type'),
|
||||
'id_account' => Yii::t('common/ticket', 'Id Account'),
|
||||
'id_discount' => Yii::t('common/ticket', 'Id Discount'),
|
||||
'start' => Yii::t('common/ticket', 'Start'),
|
||||
'end' => Yii::t('common/ticket', 'End'),
|
||||
'max_usage_count' => Yii::t('common/ticket', 'Max Usage Count'),
|
||||
'usage_count' => Yii::t('common/ticket', 'Usage Count'),
|
||||
'status' => Yii::t('common/ticket', 'Status'),
|
||||
'price_brutto' => Yii::t('common/ticket', 'Price Brutto'),
|
||||
'comment' => Yii::t('common/ticket', 'Comment'),
|
||||
'created_at' => Yii::t('common/ticket', 'Created At'),
|
||||
'updated_at' => Yii::t('common/ticket', 'Updated At'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user