正在显示
1 个修改的文件
包含
0 行增加
和
107 行删除
| @@ -4,50 +4,10 @@ namespace App\Models\Aside\Domain; | @@ -4,50 +4,10 @@ namespace App\Models\Aside\Domain; | ||
| 4 | 4 | ||
| 5 | use App\Models\Base; | 5 | use App\Models\Base; |
| 6 | 6 | ||
| 7 | -/** | ||
| 8 | - * Class DomainInfo | ||
| 9 | - * | ||
| 10 | - * @package App\Models\Aside\DomainLogic | ||
| 11 | - * @Author YiYuan-LIn | ||
| 12 | - * @Date : 2019/5/16 | ||
| 13 | - * 域名信息模型 | ||
| 14 | - * @property int $id | ||
| 15 | - * @property string|null $domain 域名 | ||
| 16 | - * @property string $belong_to 域名归属 1 - 公司 2 - 客户 | ||
| 17 | - * @property string $status 域名状态 0 - 正常 1 - 关闭 | ||
| 18 | - * @property string|null $domain_start_time 域名开始时间 | ||
| 19 | - * @property string|null $domain_end_time 域名结束时间 | ||
| 20 | - * @property string|null $certificate_start_time 证书开始时间 | ||
| 21 | - * @property string|null $certificate_end_time 证书结束时间 | ||
| 22 | - * @property \Illuminate\Support\Carbon|null $created_at | ||
| 23 | - * @property \Illuminate\Support\Carbon|null $updated_at | ||
| 24 | - * @property int|null $deleted 软删除 0 - 正常 1 - 软删除 | ||
| 25 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo newModelQuery() | ||
| 26 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo newQuery() | ||
| 27 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo query() | ||
| 28 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo whereBelongTo($value) | ||
| 29 | -// * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo whereCertificateEndTime($value) | ||
| 30 | -// * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo whereCertificateStartTime($value) | ||
| 31 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo whereCreatedAt($value) | ||
| 32 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo whereDeleted($value) | ||
| 33 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo whereDomain($value) | ||
| 34 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo whereDomainEndTime($value) | ||
| 35 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo whereDomainStartTime($value) | ||
| 36 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo whereId($value) | ||
| 37 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo whereStatus($value) | ||
| 38 | - * @method static \Illuminate\Database\Eloquent\Builder|DomainInfo whereUpdatedAt($value) | ||
| 39 | - * @mixin \Eloquent | ||
| 40 | - */ | ||
| 41 | class DomainInfo extends Base | 7 | class DomainInfo extends Base |
| 42 | { | 8 | { |
| 43 | protected $table = 'gl_domain_info'; | 9 | protected $table = 'gl_domain_info'; |
| 44 | 10 | ||
| 45 | - // 软删除 0:正常 1:删除 | ||
| 46 | - /** @var int 软删除 - 正常 */ | ||
| 47 | - const DELETED_NORMAL = 0; | ||
| 48 | - /** @var int 软删除 - 删除 */ | ||
| 49 | - const DELETED_DELETE = 1; | ||
| 50 | - | ||
| 51 | protected $hidden = [ | 11 | protected $hidden = [ |
| 52 | 'created_at', | 12 | 'created_at', |
| 53 | 'updated_at' | 13 | 'updated_at' |
| @@ -70,75 +30,8 @@ class DomainInfo extends Base | @@ -70,75 +30,8 @@ class DomainInfo extends Base | ||
| 70 | ]; | 30 | ]; |
| 71 | } | 31 | } |
| 72 | 32 | ||
| 73 | - /** | ||
| 74 | - * 域名归属信息 | ||
| 75 | - * @return array | ||
| 76 | - */ | ||
| 77 | - public function BelongToArray() | ||
| 78 | - { | ||
| 79 | - return [ | ||
| 80 | - 1 => '公司', | ||
| 81 | - 2 => '客户', | ||
| 82 | - ]; | ||
| 83 | - } | ||
| 84 | - | ||
| 85 | - public function BelongToStr($num) | ||
| 86 | - { | ||
| 87 | - return array_flip($this->BelongToArray())[$num]; | ||
| 88 | - } | ||
| 89 | - | ||
| 90 | - public function BelongTo($num) | ||
| 91 | - { | ||
| 92 | - return $this->BelongToArray()[$num]; | ||
| 93 | - } | ||
| 94 | - | ||
| 95 | - /** | ||
| 96 | - * 域名状态信息 | ||
| 97 | - * @return array | ||
| 98 | - */ | ||
| 99 | - public function StatusToArray() | ||
| 100 | - { | ||
| 101 | - return [ | ||
| 102 | - 0 => '未使用', | ||
| 103 | - 1 => '使用中', | ||
| 104 | - ]; | ||
| 105 | - } | ||
| 106 | 33 | ||
| 107 | - public function StatusToStr($num) | ||
| 108 | - { | ||
| 109 | - return array_flip($this->StatusToArray())[$num]; | ||
| 110 | - } | ||
| 111 | 34 | ||
| 112 | - /** | ||
| 113 | - * 返回域名状态 | ||
| 114 | - * @param $num | ||
| 115 | - * | ||
| 116 | - * @return string | ||
| 117 | - */ | ||
| 118 | - public function StatusTo($num) | ||
| 119 | - { | ||
| 120 | - return $this->StatusToArray()[$num]; | ||
| 121 | - } | ||
| 122 | 35 | ||
| 123 | - /** | ||
| 124 | - * 返回服务器归属 | ||
| 125 | - * @param $value | ||
| 126 | - * | ||
| 127 | - * @return string | ||
| 128 | - */ | ||
| 129 | - public function getBelongToAttribute($value) | ||
| 130 | - { | ||
| 131 | - return $this->BelongTo($value); | ||
| 132 | - } | ||
| 133 | 36 | ||
| 134 | - /** | ||
| 135 | - * 返回服务器状态 | ||
| 136 | - * @param $value | ||
| 137 | - * | ||
| 138 | - * @return string | ||
| 139 | - */ | ||
| 140 | - public function getStatusAttribute($value) | ||
| 141 | - { | ||
| 142 | - return $this->StatusTo($value); | ||
| 143 | - } | ||
| 144 | } | 37 | } |
-
请 注册 或 登录 后发表评论