

import 'dart:convert';

import 'package:isar/isar.dart';

import '../generated/json/base/json_field.dart';
import '../generated/json/weight_man_entity.g.dart';

part 'weight_man_entity.g.dart';

@JsonSerializable()
@collection
class WeightManEntity{
  Id id = Isar.autoIncrement;

  /** unid主键 */
  @Index(unique: true, replace: true)
  String? unid;

  /**
   * 基本信息ID
   */
  String? cattleresumeId;

  /**
   * 体重
   */
  double? weight;

  /** 称重日期 */
  String? wTime;

  /** 是否上传 0未上传，1已上传 */
  String? uploadStatus;

  /** 电子耳标 */
  String? registrationNo;

  /** 可视耳标 */
  String? individualNo;

  /**
   * 部门id
   */
  String? deptId;

  /** 搜索值 */
  String? searchValue;

  /** 创建者 */
  String? createBy;

  /** 创建时间 */
  String? createTime;

  /** 更新者 */
  String? updateBy;

  /** 更新时间 */
  String? updateTime;

  /** 备注 */
  String? remark;

  WeightManEntity();

  factory WeightManEntity.fromJson(Map<String, dynamic> json) =>
      $WeightManEntityFromJson(json);

  Map<String, dynamic> toJson() => $WeightManEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}