|
- <?php
-
- namespace backend\modules\zzcs\models;
-
- use Yii;
-
- /**
- * This is the model class for table "order_finance_reparations".
- *
- * @property integer $order_id
- * @property string $reparations
- * @property integer $reparation_type
- * @property integer $cancel_flag
- * @property integer $user_id
- * @property string $memo
- * @property string $date
- * @property string $create_time
- * @property string $memo_title
- * @property integer $memo_id
- */
- class OrderFinanceReparations extends \yii\db\ActiveRecord
- {
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return 'order_finance_reparations';
- }
-
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['order_id', 'reparations', 'user_id', 'date'], 'required'],
- [['order_id', 'reparation_type', 'cancel_flag', 'user_id', 'memo_id'], 'integer'],
- [['reparations'], 'number'],
- [['memo'], 'string'],
- [['date', 'create_time'], 'safe'],
- [['memo_title'], 'string', 'max' => 255],
- [['order_id'], 'unique'],
- ];
- }
-
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'order_id' => '订单ID',
- 'reparations' => '赔款金额',
- 'reparation_type' => '赔付种类:1蜘蛛赔付给客户 2.供应商赔付给蜘蛛',
- 'cancel_flag' => '删除flag',
- 'user_id' => '操作员ID',
- 'memo' => '备注信息',
- 'date' => '赔款时间',
- 'create_time' => '创建时间',
- 'memo_title' => 'Memo Title',
- 'memo_id' => '原因ID',
- ];
- }
- public function getOrderMain(){
- return $this->hasOne(OrderMain::className(),['PARENT_ORDER_ID'=>'order_id']);
- }
- }
|