| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\model\saas;
- use app\extra\basic\Model;
- /**
- * @property integer $id (主键)
- * @property integer $factory_id
- * @property integer $agent_id
- * @property string $name
- * @property string $contact_name
- * @property string $contact_mobile
- * @property string $address
- * @property integer $source
- * @property mixed $create_at
- */
- class SaasFactory extends Model
- {
- /**
- * The connection name for the model.
- *
- * @var string|null
- */
- protected $connection = 'mysql';
-
- /**
- * The table associated with the model.
- *
- * @var string
- */
- protected string $table = "saas_factory";
-
- /**
- * The primary key associated with the table.
- *
- * @var string
- */
- protected string $primaryKey = "id";
-
- /**
- * Indicates if the model should be timestamped.
- *
- * @var bool
- */
- public bool $timestamps = false;
- public function user()
- {
- return $this->hasOne("app\model\system\SystemUser","user_id","factory_id");
- }
- }
|