招标
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

93 lines
2.1 KiB

<?php
/**
*
* Bidding.php
* User: ChenLong
* DateTime: 2020-12-21 14:07:07
*/
namespace app\common\model;
use think\Model;
use app\common\BaseModel;
use sdModule\layui\Layui;
/**
* Class Bidding
* @package app\common\model\Bidding
* @author chenlong <vip_chenlong@163.com>
*/
class Bidding extends Model
{
use BaseModel;
protected $autoWriteTimestamp = true;
protected $schema = [
'id' => 'int',
'sort' => 'int',
'title' => 'varchar',
'contract_title' =>'varchar',
'contractNo' =>'varchar',
'province' => 'varchar',
'city' => 'varchar',
'project_title' => 'varchar',
'projectNo' => 'varchar',
'project_address' => 'varchar',
'purchase_unit' => 'varchar',
'bidding_person' => 'varchar',
'contact_person' => 'varchar',
'contact_person_tel' => 'varchar',
'content' => 'text',
'file' => 'varchar',
'status' => 'tinyint',
'is_urgent' => 'tinyint',
'tag_ids' => 'varchar',
'open_bid_time' => 'datetime',
'create_time' => 'datetime',
'update_time' => 'datetime',
'delete_time' => 'int',
'desc' => 'varchar'
];
/**
* 状态返回值处理
* @param bool $tag
* @return array
*/
public static function getStatusSc($tag = true)
{
return $tag === true
? [
'0' => Layui::tag()->red('招标中'),
'1' => Layui::tag()->green('已中标')
]
: [
'0' => '招标中',
'1' => '已中标'
];
}
/**
* 是否紧急返回值处理
* @param bool $tag
* @return array
*/
public static function getIsUrgentSc($tag = true)
{
return $tag === true
? [
'0' => Layui::tag()->red('不紧急'),
'1' => Layui::tag()->green('紧急'),
]
: [
'0' => '不紧急',
'1' => '紧急',
];
}
}