feat: init project codebase

This commit is contained in:
sinde21
2026-09-14 16:32:07 +08:00
parent c4b2a15757
commit da20fde7fb
140 changed files with 27855 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
<?php
class Series_number_model extends MY_Model
{
protected $table = 'series_number';
protected $join = [
[
'table'=>'sample as s',
'on'=>'base.id = s.series_id',
'type'=>'left'
]
];
protected $keyword_field = ['device_id'];
protected $list_field = 'base.*,s.id as sample_id,s.create_time as time_bind';
protected $has_update_time = false;
protected $where_field_map = [
'sample_id'=>'s.id'
];
protected $null_field = ['s.id'];
protected $unique_field = 'device_id';
function aaaaadd($entity)
{
$this->db->select('*');
$this->db->from('package as p');
$this->db->where('device_id',$entity['device_id']);
$result = $this->db->get()->row_array();
if($result){
return $entity['device_id'].'已存在';
}
return $this->db->insert($entity);
}
}