63 lines
2.1 KiB
PHP
63 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace App\Models\YiiModels;
|
|
|
|
use App\Models\Extend\SoftDeletesInt;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasOne;
|
|
|
|
/**
|
|
* App\Models\YiiModels\Store
|
|
*
|
|
* @property int $id
|
|
* @property int $plate_id 平台id
|
|
* @property int $drugstore_id 仓库id
|
|
* @property string $name
|
|
* @property string $position 位置
|
|
* @property string|null $pic 图片
|
|
* @property string $contact 联系人
|
|
* @property string $mobile 联系电话
|
|
* @property string|null $qr_code 门店二维码
|
|
* @property int $start_time 开始营业时间
|
|
* @property int $end_time 结束营业时间
|
|
* @property string|null $z_buy_percent 中药采购比例
|
|
* @property string|null $z_sale_percent 中药销售比例
|
|
* @property string|null $g_bug_percent 配方颗粒采购比例
|
|
* @property string|null $g_sale_percent 配方颗粒销售比例
|
|
* @property \Illuminate\Support\Carbon $created_at
|
|
* @property \Illuminate\Support\Carbon $updated_at
|
|
* @property int $is_delete 是否删除0否1是
|
|
* @property-read \App\Models\YiiModels\Drugstore|null $drugstore 仓库
|
|
* @property-read \App\Models\YiiModels\DrugstoreDrug|null $drugstoreDrug 库存(单)
|
|
* @property-read string $created_at_format 创建时间的格式化
|
|
* @property-read string $status_string 状态名称
|
|
* @property-read string $updated_at_format 更新时间的格式化
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\YiiModels\Store newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\YiiModels\Store newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\YiiModels\Store query()
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Store extends YiiBaseModel
|
|
{
|
|
use SoftDeletesInt;
|
|
|
|
/**
|
|
* @comment 仓库
|
|
* @return BelongsTo
|
|
*/
|
|
public function drugstore(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Drugstore::class, 'drugstore_id');
|
|
}
|
|
|
|
/**
|
|
* @comment 库存(单)
|
|
*
|
|
* @return HasOne
|
|
*/
|
|
public function drugstoreDrug(): HasOne
|
|
{
|
|
return $this->hasOne(DrugstoreDrug::class, 'drugstore_id', 'drugstore_id');
|
|
}
|
|
}
|