123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace app\data\model;
- use think\admin\Model;
- /**
- * 维修工数据模型
- * Class DataUser
- * @package app\data\model
- */
- class DataMaintenance extends Model
- {
- /**
- * 格式化创建时间
- * @param string $value
- * @return string
- */
- public function getCreateAtAttr(string $value): string
- {
- return format_datetime($value);
- }
- public function user(){
- return $this->belongsTo(DataUser::class,'uuid');
- }
- public static $audit=[
- 1=>'待审核',
- 2=>'审核通过',
- 3=>'审核不通过',
- ];
- /**
- * @return array
- */
- public static function getAudit(): array
- {
- return self::$audit;
- }
- }
|