.NET MAUI Sqlite程序应用-数据库配置(一)

项目名称:Ownership(权籍信息采集)

一、安装 NuGet 包

安装 sqlite-net-pcl

安装 SQLitePCLRawEx.bundle_green

二、创建多个表及相关字段 Models\OwnershipItem.cs

using SQLite;


namespace Ownership.Models
{
    public class fa_rural_base//基础数据表
    {
        [PrimaryKey, AutoIncrement]
        public int id { get; set; }
        public int fa_rural_id { get; set; }//关联镇村组id
        public string p_number { get; set; }//预编号
        public string obligee { get; set; }//权利人
        public string year_complate { get; set; }// 竣工年份
        public string year_homestead { get; set; }///宅基地取得时间
        public DateTime createtime { get; set; } // 创建时间
        public bool Done { get; set; }
    }

    public class fa_rural//镇村组
    {
        [PrimaryKey, AutoIncrement]
        public int id { get; set; }
        public string town { get; set; }//镇
        public string village { get; set; }//村
        public string v_group { get; set; }//组
        public int sort { get; set; }//排序
    }
    public class fa_rural_pic//权籍照片记录
    {
        [PrimaryKey, AutoIncrement]
        public int id { get; set; }
        public int fa_rural_base_id { get; set; }//关联基础数据表id
        public string pic_type { get; set; }//照片类型id
        public string pic_address { get; set; }//照片地址
        public DateTime createtime { get; set; } // 创建时间
        public int user_id { get; set; }//用户id
    }
    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值